Flutter: find out which lint / analyzer rules are enabled at what level - flutter

One can analyze lint issues in a Flutter project by running flutter analyze. Also, by providing a analysis_options.yaml file, one can enable/disable/change severity of rules, as well as import a predefined set of rules from other locations (e.g. pedantic, or from a relative path).
But is there a way to show the complete list of enabled rules, as well as their severity?
I mean the final merged version of all of them. This would be incredibly helpful, especially for exporting the same config to use in sonarqube.
Thanks a lot for helping! 🙂

In IntelliJ you can open the Analyzer Server Diagnostics by pressing the gear icon in the Analysis tab; opening a new browser window.
There, open the Context for your package and it shows the list of all activated Lint rules as seen by the analysis server

Related

dart analysis_options.yaml behaviour

I have created a dart file with this code :-
Code to see dart analyzer tools in practice.
Now, I have created an analysis_options.yaml file to add linting
but after this no info is shown :-
Now, I know I could add empty_statements: info in analysis_options.yaml.
But why did it suppress the default info.
If this happens to some other info or warnings, one could not know it because it will get suppressed.
For example if I add this line (without changing anything in analysis_options.yaml):-
As we can see no info is shown.
But had there been no analysis_options.yaml file this is shown :-
So, should I write each and every lint from here ?
Why are the default info/warnings suppressed ?
Assuming that you are using this lint package as a dev dependency, then your analysis_options.yaml file should contain this line at the top:
include: package:lint/analysis_options.yaml
Edit:
And as to the why enabling this, other rules are suppressed.. I assume it is because of this:
... only 27/150+ rules to be enabled. While some are contradictory to
each other and can not enabled together, a big chunk of rules isn't
enabled because it requires too much work to update all of Googles
existing code.
For developers outside Google, it is the norm to have
separate lint rules per project. One project might enable more rules
then others."

Target of URI doesn't exist: 'package:validate/validate.dart'

I tried running flutter packages get. Restarted IntelliJ community but still:
Need solution in this missing imports for future different packages that will come.
open Quick Action Search Tool using cntrl+Shift+A on windows;
search for "restart dart analysis server" press it to execute, this will make dart to analyze project again.

"Errors exist in the active configuration..." Eclipse Dialog when Debugging

An "Errors exist in the active configuration of project X. Proceed with launch?" dialog appears while debugging code in Eclipse. Hitting the "Proceed" button results in successful debugging. There are no apparent errors with the launch configuration. A similar Run Configuration does not generate the error.
This is caused by an invalid path somewhere in your Eclipse project settings. There are a couple common sources for this kind of error.
You're working on a shared (version controlled, copied, etc) project where someone has hardcoded a path that doesn't exist on your machine, or uses an environment variable that you've not set.
Sometimes, you can find the offending path by looking at the full list of Error messages. If not, look in your project file.
The Discovery Options in your project properties has 'Automate discovery of paths and symbols' enabled - but the process is generating an error.
If you're using a version of Eclipse that warns you this option is deprecated, uncheck the option to disable it and fix any includes in 'Preprocessor Include Paths' instead. If not. . .try it anyway.
Depending on your path changes, restart Eclipse and try again.
It starts the executable that was built last before you broke the build. That executable will be older then your source files. The reason you were able to debug is because your line numbers did not change for the code you've debugged - e.g. you may try break in main then introduce a compilation error and move main a couple lines below - the debug will highlight the wrong lines when it stops.

Eclipse #ifdef error using JNI, Android NDK and Vuforia

With Vuforia's ImageTargets sample application, I tried using OpenGL ES 1.1 by setting USE_OPENGL_ES_1_1 to true in jni/Android.mk and uncommenting and changing the corresponding line in AndroidManifest.xml (). After converting the project so that it has a C++ perspective and associating ndk-build and the proper include directories, I could successfully run the application on my Android device.
However, the problem is that once I open up jni/ImageTargets.cpp, I get several errors from Eclipse, all from places where OpenGL ES 2.0 code would execute, the first one being:
Description Resource Path Location Type Symbol 'vertexHandle' could
not be resolved ImageTargets.cpp /ImageTargets/jni line 402 Semantic
Error
Sure enough, vertexHandle is defined at the top of the ImageTargets.cpp, inside the "#ifdef USE_OPENGL_ES_2_0" block. Because USE_OPENGL_ES_2_0 is not defined (per Android.mk), the code should be able to compile successfully, and sure enough, ndk-build does not report any problems. So it seems that only Eclipse reports the problems and when I run the project, Eclipse says, "Your project contains error(s), please fix them before running your application." And thus, I cannot run my application anymore. In a sense, it's kind of strange that this never occurred until I opened ImageTargets.cpp and Eclipse "discovered" the errors.
The best work-around I've found so far is to just delete or comment out those lines (that should not be causing problems because USE_OPENGL_ES_2_0 is not supposed to be defined)... Is there a better way to deal with this problem? Did I miss a setting in Eclipse that should solve this?
I've found a solution: go to the project properties -> C/C++ Build -> Discovery Options -> Check "Automate discovery of paths and symbols"

Carbide does not include debugging info for some files

In Carbide 2.0.2, if I set active configuration to be "Phone Debug GCCE", build the project, go to Debug perspective, choose "Executables" tab, and select the executable file, Source File Name/Location window will list all the files I am able to use while debugging.
The problem is that the list does not contain all files from the project, even though their code is successfully linked and executed on a device. As a consequence of the issue, I am not able to set break points in these files.
What is the catch and how can I fix it?
Thank you.
This is a problem with the version of GCCE that is used by default with Symbian. It has a number of bugs with debug information, including sometimes missing line information for some files.
The alternatives are (a) the commercial RVCT compiler, or (b) follow the in-progress work to move to a newer GCCE compiler. A good start for that is here:
http://developer.symbian.org/wiki/index.php/The_GCCE_toolchain_initiative