Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Statistical Checkers #805

Closed
dkrupp opened this issue Aug 15, 2017 · 2 comments
Closed

Support for Statistical Checkers #805

dkrupp opened this issue Aug 15, 2017 · 2 comments
Assignees
Labels
analyzer 📈 Related to the analyze commands (analysis driver) enhancement 🌟
Milestone

Comments

@dkrupp
Copy link
Member

dkrupp commented Aug 15, 2017

Statistical checkers require 2-phase analysis. In the 1st, statistics collection-phase, the source code is analyzed and information is collected about the API usages. These statistics are stored into collection directory. In the 2nd, analysis phase, the collected information is used to find bugs in the code (API usages that are non-conform to the applied coding style).

CodeChecker will support this 2-phase analysis.
Checkers that benefit from the support are api.SpecialReturnValue, api.UncheckedReturnValue.

Add --statistics-collect option to analyze which switches on experimental statistics collection checkers:

  • statisticsCollector.ReturnValueCheck
  • statisticsCollector.SpecialReturnValue

The option will only be shown if the checkers are available.

The statistics will be stored into in <REPORT-DIR>/statistics directory.

If any of the

  • api.SpecialReturnValue
  • api.UncheckedReturnValue

checkers are switched on, look for statistics file in the <REPORT-DIR>/statistics directory.

Introduce a new optional analyze argument --preanalize-dir <PREANALYZE-DIR> which is a <REPORT_DIR> with the CTU and statistics pre-analysis results.

Using this parameter it will be possible to share the pre-analysis results between multiple analysis runs. So if this parameter is given, the --ctu-analyze and the ctu-on-the-fly, and the statistical checkers will search for the CTU and statistics interim files in <PRE-ANALYZE-DIR>/ctu and <PRE-ANALYZE-DIR>/statistics directories.

@dkrupp dkrupp added this to the 6.0 pre3 milestone Aug 15, 2017
@dkrupp dkrupp self-assigned this Aug 15, 2017
@whisperity whisperity added CLI 💻 Related to the command-line interface, such as the cmd, store, etc. commands enhancement 🌟 labels Aug 15, 2017
@whisperity whisperity modified the milestones: release 5.10.1, 6.0 pre3 Aug 15, 2017
@dkrupp
Copy link
Member Author

dkrupp commented Aug 16, 2017

Are these options OK like this? What do you think?

@whisperity
Copy link
Contributor

So I read it correctly that --preanalyze-dir is by default same as <OUTPUT_DIR> (the name of the opstring is NOT report-dir but output-dir!), but we can set it to something else?

I don't like the phrase preanalyze-dir. A better string should be found, one that conveys the fact that extra analysis resources are stored here.

@whisperity whisperity added analyzer 📈 Related to the analyze commands (analysis driver) and removed CLI 💻 Related to the command-line interface, such as the cmd, store, etc. commands labels Aug 19, 2017
@dkrupp dkrupp changed the title support for statistical checkers Support for Statistical Checkers Aug 21, 2017
@dkrupp dkrupp modified the milestones: release 6.1, release 5.10.1 Aug 22, 2017
@dkrupp dkrupp modified the milestones: release 6.2, release 6.3 Nov 7, 2017
@gyorb gyorb modified the milestones: release 6.3, Future features Nov 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer 📈 Related to the analyze commands (analysis driver) enhancement 🌟
Projects
None yet
Development

No branches or pull requests

6 participants