Questions tagged [oclint]

OCLint is a static code analysis tool for improving the quality of C, C++ and primarily Objective-C. Code analysis reduces defects by inspecting the code and looking for potential problems.

OCLint is a static code analysis tool for improving quality and reducing defects by inspecting C, C++ and Objective-C code and looking for potential problems like:

  • Possible bugs - empty if/else/try/catch/finally statements.
  • Unused code - unused local variables and parameters
  • Complicated code - high cyclomatic complexity, NPath complexity and high NCSS
  • Redundant code - redundant if statement and useless parentheses
  • Code smells - long method and long parameter list
  • Bad practices - inverted logic and parameter reassignment

Static code analysis is a critical technique to detect defects that aren't visible to compilers. OCLint automates this inspection process with advanced features:

Relying on the abstract syntax tree of the source code for better accuracy and efficiency; False positives are mostly reduced to avoid useful results sinking in them. Dynamically loading rules into system, even in the runtime. Flexible and extensible configurations ensure users in customizing the behaviors of the tool. Command line invocation facilitates continuous integration and continuous inspection of the code while being developed, so that technical debts can be fixed early on to reduce the maintenance cost.

48 questions
0
votes
1 answer

Npath and Cyclomatic complexity using Oclint

Can someone please explain me how to get the Npath and Cyclomatic complexity using the Oclint tool? I am currently using the command ./oclint /home/kyriakos/Measurements/base64.c -- -c and getting as output: OCLint Report Summary: TotalFiles=1…
Kyriakos
  • 757
  • 8
  • 23
0
votes
1 answer

oclint-json-compilation-database errors

..I am trying to generate the report using oclint-json-compilation oclint-json-compilation-database -v oclint_args "-report-type html -o report.html -rc=LONG_LINE=120" open compile_commands.json open report.html and I am getting the following…
Prajwal Udupa
  • 860
  • 5
  • 28
0
votes
1 answer

Assertion failed: (SourceMgr && "SourceManager not set!") with oclint-json-compilation-database

I am trying to generate OCLint report. When I try executing the command "oclint-json-compilation-database --debug" I get the following error :- Compiling /Users/tavant/Desktop/TestJenkinsCI/TestJenkinsCI/AppDelegate.m**Assertion failed: (SourceMgr…
B.V.
  • 73
  • 8
1 2 3
4