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

oclint errors #1547

Open
markus2330 opened this Issue Jul 20, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@markus2330
Contributor

markus2330 commented Jul 20, 2017

@sanssecours wrote in #1546

Did the tool find something?

Yes, for example the command

oclint -p build -no-analytics -enable-global-analysis -enable-clang-static-analyzer src/plugins/ini/*.c

produces the following output:

OCLint Report

Summary: TotalFiles=3 FilesWithViolations=2 P1=0 P2=106 P3=90

src/plugins/ini/ini.c:381:2: collapsible if statements [basic|P3]
src/plugins/ini/ini.c:660:3: collapsible if statements [basic|P3]
src/plugins/ini/ini.c:882:2: collapsible if statements [basic|P3]
src/plugins/ini/ini.c:342:1: high cyclomatic complexity [size|P2] Cyclomatic Complexity Number 19 exceeds limit of 10
src/plugins/ini/ini.c:639:1: high cyclomatic complexity [size|P2] Cyclomatic Complexity Number 11 exceeds limit of 10
src/plugins/ini/ini.c:699:1: high cyclomatic complexity [size|P2] Cyclomatic Complexity Number 20 exceeds limit of 10
src/plugins/ini/ini.c:879:1: high cyclomatic complexity [size|P2] Cyclomatic Complexity Number 11 exceeds limit of 10
src/plugins/ini/ini.c:955:1: high cyclomatic complexity [size|P2] Cyclomatic Complexity Number 12 exceeds limit of 10
src/plugins/ini/ini.c:1041:1: high cyclomatic complexity [size|P2] Cyclomatic Complexity Number 12 exceeds limit of 10
src/plugins/ini/ini.c:1106:1: high cyclomatic complexity [size|P2] Cyclomatic Complexity Number 23 exceeds limit of 10
src/plugins/ini/ini.c:1174:1: high cyclomatic complexity [size|P2] Cyclomatic Complexity Number 11 exceeds limit of 10
src/plugins/ini/ini.c:1192:1: high cyclomatic complexity [size|P2] Cyclomatic Complexity Number 50 exceeds limit of 10
src/plugins/ini/ini.c:1471:1: high cyclomatic complexity [size|P2] Cyclomatic Complexity Number 12 exceeds limit of 10
src/plugins/ini/ini.c:1518:1: high cyclomatic complexity [size|P2] Cyclomatic Complexity Number 23 exceeds limit of 10
src/plugins/ini/ini.c:329:7: inverted logic [convention|P3]
src/plugins/ini/ini.c:360:6: inverted logic [convention|P3]
src/plugins/ini/ini.c:408:6: inverted logic [convention|P3]
src/plugins/ini/ini.c:536:6: inverted logic [convention|P3]
src/plugins/ini/ini.c:546:6: inverted logic [convention|P3]
src/plugins/ini/ini.c:556:6: inverted logic [convention|P3]
src/plugins/ini/ini.c:562:7: inverted logic [convention|P3]
src/plugins/ini/ini.c:571:6: inverted logic [convention|P3]
src/plugins/ini/ini.c:577:7: inverted logic [convention|P3]
src/plugins/ini/ini.c:581:12: inverted logic [convention|P3]
src/plugins/ini/ini.c:897:6: inverted logic [convention|P3]
src/plugins/ini/ini.c:1025:7: inverted logic [convention|P3]
src/plugins/ini/ini.c:1053:8: inverted logic [convention|P3]
src/plugins/ini/ini.c:1076:7: inverted logic [convention|P3]
src/plugins/ini/ini.c:1281:11: inverted logic [convention|P3]
src/plugins/ini/ini.c:1295:17: inverted logic [convention|P3]
src/plugins/ini/ini.c:1299:17: inverted logic [convention|P3]
src/plugins/ini/ini.c:1539:11: inverted logic [convention|P3]
src/plugins/ini/ini.c:31:1: long method [size|P3] Method with 81 lines exceeds limit of 50
src/plugins/ini/ini.c:233:1: long method [size|P3] Method with 56 lines exceeds limit of 50
src/plugins/ini/ini.c:342:1: long method [size|P3] Method with 93 lines exceeds limit of 50
src/plugins/ini/ini.c:467:1: long method [size|P3] Method with 51 lines exceeds limit of 50
src/plugins/ini/ini.c:521:1: long method [size|P3] Method with 81 lines exceeds limit of 50
src/plugins/ini/ini.c:699:1: long method [size|P3] Method with 94 lines exceeds limit of 50
src/plugins/ini/ini.c:955:1: long method [size|P3] Method with 84 lines exceeds limit of 50
src/plugins/ini/ini.c:1041:1: long method [size|P3] Method with 63 lines exceeds limit of 50
src/plugins/ini/ini.c:1192:1: long method [size|P3] Method with 230 lines exceeds limit of 50
src/plugins/ini/ini.c:1518:1: long method [size|P3] Method with 95 lines exceeds limit of 50
src/plugins/ini/ini.c:31:1: high ncss method [size|P2] Method of 48 non-commenting source statements exceeds limit of 30
src/plugins/ini/ini.c:35:1: high ncss method [size|P2] Method of 32 non-commenting source statements exceeds limit of 30
src/plugins/ini/ini.c:233:1: high ncss method [size|P2] Method of 42 non-commenting source statements exceeds limit of 30
src/plugins/ini/ini.c:292:1: high ncss method [size|P2] Method of 34 non-commenting source statements exceeds limit of 30
src/plugins/ini/ini.c:342:1: high ncss method [size|P2] Method of 62 non-commenting source statements exceeds limit of 30
src/plugins/ini/ini.c:467:1: high ncss method [size|P2] Method of 35 non-commenting source statements exceeds limit of 30
src/plugins/ini/ini.c:521:1: high ncss method [size|P2] Method of 48 non-commenting source statements exceeds limit of 30
src/plugins/ini/ini.c:688:1: high ncss method [size|P2] Method of 39 non-commenting source statements exceeds limit of 30
src/plugins/ini/ini.c:699:1: high ncss method [size|P2] Method of 92 non-commenting source statements exceeds limit of 30
src/plugins/ini/ini.c:879:1: high ncss method [size|P2] Method of 39 non-commenting source statements exceeds limit of 30
src/plugins/ini/ini.c:955:1: high ncss method [size|P2] Method of 66 non-commenting source statements exceeds limit of 30
src/plugins/ini/ini.c:1041:1: high ncss method [size|P2] Method of 38 non-commenting source statements exceeds limit of 30
src/plugins/ini/ini.c:1106:1: high ncss method [size|P2] Method of 32 non-commenting source statements exceeds limit of 30
src/plugins/ini/ini.c:1192:1: high ncss method [size|P2] Method of 155 non-commenting source statements exceeds limit of 30
src/plugins/ini/ini.c:1423:1: high ncss method [size|P2] Method of 39 non-commenting source statements exceeds limit of 30
src/plugins/ini/ini.c:1518:1: high ncss method [size|P2] Method of 76 non-commenting source statements exceeds limit of 30
src/plugins/ini/ini.c:1193:1: deep nested block [size|P3] Block depth of 9 exceeds limit of 5
src/plugins/ini/ini.c:1209:2: deep nested block [size|P3] Block depth of 8 exceeds limit of 5
src/plugins/ini/ini.c:1256:3: deep nested block [size|P3] Block depth of 7 exceeds limit of 5
src/plugins/ini/ini.c:1272:4: deep nested block [size|P3] Block depth of 6 exceeds limit of 5
src/plugins/ini/ini.c:1472:1: deep nested block [size|P3] Block depth of 6 exceeds limit of 5
src/plugins/ini/ini.c:35:1: high npath complexity [size|P2] NPath Complexity Number 61992 exceeds limit of 200
src/plugins/ini/ini.c:342:1: high npath complexity [size|P2] NPath Complexity Number 5400 exceeds limit of 200
src/plugins/ini/ini.c:699:1: high npath complexity [size|P2] NPath Complexity Number 1728 exceeds limit of 200
src/plugins/ini/ini.c:879:1: high npath complexity [size|P2] NPath Complexity Number 288 exceeds limit of 200
src/plugins/ini/ini.c:1106:1: high npath complexity [size|P2] NPath Complexity Number 61992 exceeds limit of 200
src/plugins/ini/ini.c:1192:1: high npath complexity [size|P2] NPath Complexity Number 232816 exceeds limit of 200
src/plugins/ini/ini.c:1518:1: high npath complexity [size|P2] NPath Complexity Number 25920 exceeds limit of 200
src/plugins/ini/ini.c:357:3: parameter reassignment [convention|P3]
src/plugins/ini/ini.c:1033:4: parameter reassignment [convention|P3]
src/plugins/ini/ini.c:1036:3: parameter reassignment [convention|P3]
src/plugins/ini/ini.c:35:25: short variable name [naming|P3] Length of variable name `a` is 1, which is shorter than the threshold of 3
src/plugins/ini/ini.c:35:41: short variable name [naming|P3] Length of variable name `b` is 1, which is shorter than the threshold of 3
src/plugins/ini/ini.c:118:2: short variable name [naming|P3] Length of variable name `p` is 1, which is shorter than the threshold of 3
src/plugins/ini/ini.c:136:4: short variable name [naming|P3] Length of variable name `rc` is 2, which is shorter than the threshold of 3
src/plugins/ini/ini.c:292:62: short variable name [naming|P3] Length of variable name `ks` is 2, which is shorter than the threshold of 3
src/plugins/ini/ini.c:639:61: short variable name [naming|P3] Length of variable name `ks` is 2, which is shorter than the threshold of 3
src/plugins/ini/ini.c:674:25: short variable name [naming|P3] Length of variable name `ks` is 2, which is shorter than the threshold of 3
src/plugins/ini/ini.c:715:2: short variable name [naming|P3] Length of variable name `fh` is 2, which is shorter than the threshold of 3
src/plugins/ini/ini.c:798:36: short variable name [naming|P3] Length of variable name `fh` is 2, which is shorter than the threshold of 3
src/plugins/ini/ini.c:835:58: short variable name [naming|P3] Length of variable name `fh` is 2, which is shorter than the threshold of 3
src/plugins/ini/ini.c:913:2: short variable name [naming|P3] Length of variable name `p` is 1, which is shorter than the threshold of 3
src/plugins/ini/ini.c:929:39: short variable name [naming|P3] Length of variable name `ks` is 2, which is shorter than the threshold of 3
src/plugins/ini/ini.c:938:37: short variable name [naming|P3] Length of variable name `ks` is 2, which is shorter than the threshold of 3
src/plugins/ini/ini.c:946:41: short variable name [naming|P3] Length of variable name `ks` is 2, which is shorter than the threshold of 3
src/plugins/ini/ini.c:1106:25: short variable name [naming|P3] Length of variable name `a` is 1, which is shorter than the threshold of 3
src/plugins/ini/ini.c:1106:41: short variable name [naming|P3] Length of variable name `b` is 1, which is shorter than the threshold of 3
src/plugins/ini/ini.c:1108:2: short variable name [naming|P3] Length of variable name `ka` is 2, which is shorter than the threshold of 3
src/plugins/ini/ini.c:1109:2: short variable name [naming|P3] Length of variable name `kb` is 2, which is shorter than the threshold of 3
src/plugins/ini/ini.c:1174:27: short variable name [naming|P3] Length of variable name `fh` is 2, which is shorter than the threshold of 3
src/plugins/ini/ini.c:1192:28: short variable name [naming|P3] Length of variable name `fh` is 2, which is shorter than the threshold of 3
src/plugins/ini/ini.c:1423:64: short variable name [naming|P3] Length of variable name `ks` is 2, which is shorter than the threshold of 3
src/plugins/ini/ini.c:1471:37: short variable name [naming|P3] Length of variable name `ks` is 2, which is shorter than the threshold of 3
src/plugins/ini/ini.c:1494:5: short variable name [naming|P3] Length of variable name `k` is 1, which is shorter than the threshold of 3
src/plugins/ini/ini.c:1523:2: short variable name [naming|P3] Length of variable name `fh` is 2, which is shorter than the threshold of 3
src/plugins/ini/ini.c:772:3: too few branches in switch statement [convention|P3]
src/plugins/ini/ini.c:443:3: unnecessary else statement [redundant|P3]
src/plugins/ini/ini.c:943:3: unnecessary else statement [redundant|P3]
src/plugins/ini/ini.c:181:6: useless parentheses [redundant|P3]
src/plugins/ini/ini.c:381:6: useless parentheses [redundant|P3]
src/plugins/ini/ini.c:452:6: useless parentheses [redundant|P3]
src/plugins/ini/testmod_ini.c:25:1: high cyclomatic complexity [size|P2] Cyclomatic Complexity Number 14 exceeds limit of 10
src/plugins/ini/testmod_ini.c:120:1: high cyclomatic complexity [size|P2] Cyclomatic Complexity Number 22 exceeds limit of 10
src/plugins/ini/testmod_ini.c:197:1: high cyclomatic complexity [size|P2] Cyclomatic Complexity Number 13 exceeds limit of 10
src/plugins/ini/testmod_ini.c:279:1: high cyclomatic complexity [size|P2] Cyclomatic Complexity Number 21 exceeds limit of 10
src/plugins/ini/testmod_ini.c:40:2: double negative [basic|P2]
src/plugins/ini/testmod_ini.c:47:2: double negative [basic|P2]
src/plugins/ini/testmod_ini.c:51:2: double negative [basic|P2]
src/plugins/ini/testmod_ini.c:137:2: double negative [basic|P2]
src/plugins/ini/testmod_ini.c:140:2: double negative [basic|P2]
src/plugins/ini/testmod_ini.c:147:2: double negative [basic|P2]
src/plugins/ini/testmod_ini.c:150:2: double negative [basic|P2]
src/plugins/ini/testmod_ini.c:157:2: double negative [basic|P2]
src/plugins/ini/testmod_ini.c:160:2: double negative [basic|P2]
src/plugins/ini/testmod_ini.c:213:2: double negative [basic|P2]
src/plugins/ini/testmod_ini.c:217:2: double negative [basic|P2]
src/plugins/ini/testmod_ini.c:221:2: double negative [basic|P2]
src/plugins/ini/testmod_ini.c:271:2: double negative [basic|P2]
src/plugins/ini/testmod_ini.c:293:2: double negative [basic|P2]
src/plugins/ini/testmod_ini.c:305:2: double negative [basic|P2]
src/plugins/ini/testmod_ini.c:309:2: double negative [basic|P2]
src/plugins/ini/testmod_ini.c:317:2: double negative [basic|P2]
src/plugins/ini/testmod_ini.c:398:2: double negative [basic|P2]
src/plugins/ini/testmod_ini.c:400:2: double negative [basic|P2]
src/plugins/ini/testmod_ini.c:504:2: double negative [basic|P2]
src/plugins/ini/testmod_ini.c:506:2: double negative [basic|P2]
src/plugins/ini/testmod_ini.c:40:2: multiple unary operator [basic|P2]
src/plugins/ini/testmod_ini.c:47:2: multiple unary operator [basic|P2]
src/plugins/ini/testmod_ini.c:51:2: multiple unary operator [basic|P2]
src/plugins/ini/testmod_ini.c:137:2: multiple unary operator [basic|P2]
src/plugins/ini/testmod_ini.c:140:2: multiple unary operator [basic|P2]
src/plugins/ini/testmod_ini.c:147:2: multiple unary operator [basic|P2]
src/plugins/ini/testmod_ini.c:150:2: multiple unary operator [basic|P2]
src/plugins/ini/testmod_ini.c:157:2: multiple unary operator [basic|P2]
src/plugins/ini/testmod_ini.c:160:2: multiple unary operator [basic|P2]
src/plugins/ini/testmod_ini.c:213:2: multiple unary operator [basic|P2]
src/plugins/ini/testmod_ini.c:217:2: multiple unary operator [basic|P2]
src/plugins/ini/testmod_ini.c:221:2: multiple unary operator [basic|P2]
src/plugins/ini/testmod_ini.c:271:2: multiple unary operator [basic|P2]
src/plugins/ini/testmod_ini.c:293:2: multiple unary operator [basic|P2]
src/plugins/ini/testmod_ini.c:305:2: multiple unary operator [basic|P2]
src/plugins/ini/testmod_ini.c:309:2: multiple unary operator [basic|P2]
src/plugins/ini/testmod_ini.c:317:2: multiple unary operator [basic|P2]
src/plugins/ini/testmod_ini.c:398:2: multiple unary operator [basic|P2]
src/plugins/ini/testmod_ini.c:400:2: multiple unary operator [basic|P2]
src/plugins/ini/testmod_ini.c:504:2: multiple unary operator [basic|P2]
src/plugins/ini/testmod_ini.c:506:2: multiple unary operator [basic|P2]
src/plugins/ini/testmod_ini.c:25:1: high ncss method [size|P2] Method of 70 non-commenting source statements exceeds limit of 30
src/plugins/ini/testmod_ini.c:59:1: high ncss method [size|P2] Method of 42 non-commenting source statements exceeds limit of 30
src/plugins/ini/testmod_ini.c:85:1: high ncss method [size|P2] Method of 57 non-commenting source statements exceeds limit of 30
src/plugins/ini/testmod_ini.c:120:1: high ncss method [size|P2] Method of 107 non-commenting source statements exceeds limit of 30
src/plugins/ini/testmod_ini.c:169:1: high ncss method [size|P2] Method of 42 non-commenting source statements exceeds limit of 30
src/plugins/ini/testmod_ini.c:197:1: high ncss method [size|P2] Method of 65 non-commenting source statements exceeds limit of 30
src/plugins/ini/testmod_ini.c:229:1: high ncss method [size|P2] Method of 42 non-commenting source statements exceeds limit of 30
src/plugins/ini/testmod_ini.c:254:1: high ncss method [size|P2] Method of 39 non-commenting source statements exceeds limit of 30
src/plugins/ini/testmod_ini.c:279:1: high ncss method [size|P2] Method of 101 non-commenting source statements exceeds limit of 30
src/plugins/ini/testmod_ini.c:325:1: high ncss method [size|P2] Method of 42 non-commenting source statements exceeds limit of 30
src/plugins/ini/testmod_ini.c:351:1: high ncss method [size|P2] Method of 42 non-commenting source statements exceeds limit of 30
src/plugins/ini/testmod_ini.c:371:1: high ncss method [size|P2] Method of 42 non-commenting source statements exceeds limit of 30
src/plugins/ini/testmod_ini.c:389:1: high ncss method [size|P2] Method of 41 non-commenting source statements exceeds limit of 30
src/plugins/ini/testmod_ini.c:406:1: high ncss method [size|P2] Method of 42 non-commenting source statements exceeds limit of 30
src/plugins/ini/testmod_ini.c:424:1: high ncss method [size|P2] Method of 45 non-commenting source statements exceeds limit of 30
src/plugins/ini/testmod_ini.c:448:1: high ncss method [size|P2] Method of 45 non-commenting source statements exceeds limit of 30
src/plugins/ini/testmod_ini.c:471:1: high ncss method [size|P2] Method of 45 non-commenting source statements exceeds limit of 30
src/plugins/ini/testmod_ini.c:495:1: high ncss method [size|P2] Method of 41 non-commenting source statements exceeds limit of 30
src/plugins/ini/testmod_ini.c:511:1: high ncss method [size|P2] Method of 42 non-commenting source statements exceeds limit of 30
src/plugins/ini/testmod_ini.c:535:1: high ncss method [size|P2] Method of 42 non-commenting source statements exceeds limit of 30
src/plugins/ini/testmod_ini.c:562:1: high ncss method [size|P2] Method of 42 non-commenting source statements exceeds limit of 30
src/plugins/ini/testmod_ini.c:25:1: high npath complexity [size|P2] NPath Complexity Number 8192 exceeds limit of 200
src/plugins/ini/testmod_ini.c:85:1: high npath complexity [size|P2] NPath Complexity Number 512 exceeds limit of 200
src/plugins/ini/testmod_ini.c:120:1: high npath complexity [size|P2] NPath Complexity Number 2097152 exceeds limit of 200
src/plugins/ini/testmod_ini.c:197:1: high npath complexity [size|P2] NPath Complexity Number 4096 exceeds limit of 200
src/plugins/ini/testmod_ini.c:279:1: high npath complexity [size|P2] NPath Complexity Number 1048576 exceeds limit of 200
src/plugins/ini/testmod_ini.c:32:2: short variable name [naming|P3] Length of variable name `ks` is 2, which is shorter than the threshold of 3
src/plugins/ini/testmod_ini.c:65:2: short variable name [naming|P3] Length of variable name `ks` is 2, which is shorter than the threshold of 3
src/plugins/ini/testmod_ini.c:91:2: short variable name [naming|P3] Length of variable name `ks` is 2, which is shorter than the threshold of 3
src/plugins/ini/testmod_ini.c:127:2: short variable name [naming|P3] Length of variable name `ks` is 2, which is shorter than the threshold of 3
src/plugins/ini/testmod_ini.c:175:2: short variable name [naming|P3] Length of variable name `ks` is 2, which is shorter than the threshold of 3
src/plugins/ini/testmod_ini.c:205:2: short variable name [naming|P3] Length of variable name `ks` is 2, which is shorter than the threshold of 3
src/plugins/ini/testmod_ini.c:236:2: short variable name [naming|P3] Length of variable name `ks` is 2, which is shorter than the threshold of 3
src/plugins/ini/testmod_ini.c:261:2: short variable name [naming|P3] Length of variable name `ks` is 2, which is shorter than the threshold of 3
src/plugins/ini/testmod_ini.c:285:2: short variable name [naming|P3] Length of variable name `ks` is 2, which is shorter than the threshold of 3
src/plugins/ini/testmod_ini.c:331:2: short variable name [naming|P3] Length of variable name `ks` is 2, which is shorter than the threshold of 3
src/plugins/ini/testmod_ini.c:355:2: short variable name [naming|P3] Length of variable name `ks` is 2, which is shorter than the threshold of 3
src/plugins/ini/testmod_ini.c:376:2: short variable name [naming|P3] Length of variable name `ks` is 2, which is shorter than the threshold of 3
src/plugins/ini/testmod_ini.c:393:2: short variable name [naming|P3] Length of variable name `ks` is 2, which is shorter than the threshold of 3
src/plugins/ini/testmod_ini.c:411:2: short variable name [naming|P3] Length of variable name `ks` is 2, which is shorter than the threshold of 3
src/plugins/ini/testmod_ini.c:429:2: short variable name [naming|P3] Length of variable name `ks` is 2, which is shorter than the threshold of 3
src/plugins/ini/testmod_ini.c:453:2: short variable name [naming|P3] Length of variable name `ks` is 2, which is shorter than the threshold of 3
src/plugins/ini/testmod_ini.c:476:2: short variable name [naming|P3] Length of variable name `ks` is 2, which is shorter than the threshold of 3
src/plugins/ini/testmod_ini.c:499:2: short variable name [naming|P3] Length of variable name `ks` is 2, which is shorter than the threshold of 3
src/plugins/ini/testmod_ini.c:517:2: short variable name [naming|P3] Length of variable name `ks` is 2, which is shorter than the threshold of 3
src/plugins/ini/testmod_ini.c:541:2: short variable name [naming|P3] Length of variable name `ks` is 2, which is shorter than the threshold of 3
src/plugins/ini/testmod_ini.c:568:2: short variable name [naming|P3] Length of variable name `ks` is 2, which is shorter than the threshold of 3

[OCLint (http://oclint.org) v0.12]

oclint: error: violations exceed threshold
P1=0[0] P2=106[10] P3=90[20]

. I also tried running the tool for the whole project via the command oclint-json-compilation-database, but unfortunately it looks like this currently does not work correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment