-
Notifications
You must be signed in to change notification settings - Fork 475
[FIX] Remove hash generation for malformed plists #4978
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
09b1d0f
[FIX] Remove hash generation for malformed plists
Makkareal 1f89df5
fixup! [FIX] Remove hash generation for malformed plists
Makkareal fc66857
fixup! fixup! [FIX] Remove hash generation for malformed plists
Makkareal 02083be
fixup! fixup! fixup! [FIX] Remove hash generation for malformed plists
Makkareal 8852186
fixup! fixup! fixup! fixup! [FIX] Remove hash generation for malforme…
Makkareal 59a6ac0
fixup! fixup! fixup! fixup! fixup! [FIX] Remove hash generation for m…
Makkareal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,7 +13,7 @@ void test1(int z) { | |
| int x = 1 / z; // warn | ||
| } | ||
|
|
||
| void test2{ | ||
| void test2(){ | ||
| int x = 1; | ||
| div(x) | ||
| div(x); | ||
| } | ||
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
|
|
||
| all: analyze | ||
|
|
||
| analyze: | ||
| cppcheck --enable=all --plist-output=. . |
19 changes: 19 additions & 0 deletions
19
web/tests/functional/cppcheck/correct_test_proj/divide_zero.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| // ------------------------------------------------------------------------- | ||
| // Part of the CodeChecker project, under the Apache License v2.0 with | ||
| // LLVM Exceptions. See LICENSE for license information. | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
| // ------------------------------------------------------------------------- | ||
|
|
||
| // core.DivideZero (C, C++, ObjC) | ||
| // Check for division by zero. | ||
| #include "lib.h" | ||
|
|
||
| void test1(int z) { | ||
| if (z == 0) | ||
| int x = 1 / z; // warn | ||
| } | ||
|
|
||
| void test2(){ | ||
| int x = 1; | ||
| div(x); | ||
| } |
310 changes: 310 additions & 0 deletions
310
web/tests/functional/cppcheck/correct_test_proj/divide_zero.plist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,310 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| <plist version="1.0"> | ||
| <dict> | ||
| <key>diagnostics</key> | ||
| <array> | ||
| <dict> | ||
| <key>category</key> | ||
| <string>error</string> | ||
| <key>check_name</key> | ||
| <string>cppcheck-zerodiv</string> | ||
| <key>description</key> | ||
| <string>Division by zero.</string> | ||
| <key>issue_hash_content_of_line_in_context</key> | ||
| <string>f5daf9f6c6b883716a45183adde1d9d3</string> | ||
| <key>location</key> | ||
| <dict> | ||
| <key>col</key> | ||
| <integer>13</integer> | ||
| <key>file</key> | ||
| <integer>1</integer> | ||
| <key>line</key> | ||
| <integer>11</integer> | ||
| </dict> | ||
| <key>path</key> | ||
| <array> | ||
| <dict> | ||
| <key>depth</key> | ||
| <integer>0</integer> | ||
| <key>kind</key> | ||
| <string>event</string> | ||
| <key>location</key> | ||
| <dict> | ||
| <key>col</key> | ||
| <integer>13</integer> | ||
| <key>file</key> | ||
| <integer>1</integer> | ||
| <key>line</key> | ||
| <integer>11</integer> | ||
| </dict> | ||
| <key>message</key> | ||
| <string>Division by zero</string> | ||
| <key>ranges</key> | ||
| <array> | ||
| <array> | ||
| <dict> | ||
| <key>col</key> | ||
| <integer>13</integer> | ||
| <key>file</key> | ||
| <integer>1</integer> | ||
| <key>line</key> | ||
| <integer>11</integer> | ||
| </dict> | ||
| <dict> | ||
| <key>col</key> | ||
| <integer>13</integer> | ||
| <key>file</key> | ||
| <integer>1</integer> | ||
| <key>line</key> | ||
| <integer>11</integer> | ||
| </dict> | ||
| </array> | ||
| </array> | ||
| </dict> | ||
| <dict> | ||
| <key>depth</key> | ||
| <integer>0</integer> | ||
| <key>kind</key> | ||
| <string>event</string> | ||
| <key>location</key> | ||
| <dict> | ||
| <key>col</key> | ||
| <integer>13</integer> | ||
| <key>file</key> | ||
| <integer>1</integer> | ||
| <key>line</key> | ||
| <integer>11</integer> | ||
| </dict> | ||
| <key>message</key> | ||
| <string>Division by zero.</string> | ||
| <key>ranges</key> | ||
| <array> | ||
| <array> | ||
| <dict> | ||
| <key>col</key> | ||
| <integer>13</integer> | ||
| <key>file</key> | ||
| <integer>1</integer> | ||
| <key>line</key> | ||
| <integer>11</integer> | ||
| </dict> | ||
| <dict> | ||
| <key>col</key> | ||
| <integer>13</integer> | ||
| <key>file</key> | ||
| <integer>1</integer> | ||
| <key>line</key> | ||
| <integer>11</integer> | ||
| </dict> | ||
| </array> | ||
| </array> | ||
| </dict> | ||
| </array> | ||
| </dict> | ||
| <dict> | ||
| <key>category</key> | ||
| <string>warning</string> | ||
| <key>check_name</key> | ||
| <string>cppcheck-zerodivcond</string> | ||
| <key>description</key> | ||
| <string>Either the condition 'z==0' is redundant or there is division by zero at line 13.</string> | ||
| <key>issue_hash_content_of_line_in_context</key> | ||
| <string>cb1ef69bbe051721d0b09f981ee63319</string> | ||
| <key>location</key> | ||
| <dict> | ||
| <key>col</key> | ||
| <integer>15</integer> | ||
| <key>file</key> | ||
| <integer>0</integer> | ||
| <key>line</key> | ||
| <integer>13</integer> | ||
| </dict> | ||
| <key>path</key> | ||
| <array> | ||
| <dict> | ||
| <key>edges</key> | ||
| <array> | ||
| <dict> | ||
| <key>end</key> | ||
| <array> | ||
| <dict> | ||
| <key>col</key> | ||
| <integer>15</integer> | ||
| <key>file</key> | ||
| <integer>0</integer> | ||
| <key>line</key> | ||
| <integer>13</integer> | ||
| </dict> | ||
| <dict> | ||
| <key>col</key> | ||
| <integer>15</integer> | ||
| <key>file</key> | ||
| <integer>0</integer> | ||
| <key>line</key> | ||
| <integer>13</integer> | ||
| </dict> | ||
| </array> | ||
| <key>start</key> | ||
| <array> | ||
| <dict> | ||
| <key>col</key> | ||
| <integer>9</integer> | ||
| <key>file</key> | ||
| <integer>0</integer> | ||
| <key>line</key> | ||
| <integer>12</integer> | ||
| </dict> | ||
| <dict> | ||
| <key>col</key> | ||
| <integer>9</integer> | ||
| <key>file</key> | ||
| <integer>0</integer> | ||
| <key>line</key> | ||
| <integer>12</integer> | ||
| </dict> | ||
| </array> | ||
| </dict> | ||
| </array> | ||
| <key>kind</key> | ||
| <string>control</string> | ||
| </dict> | ||
| <dict> | ||
| <key>depth</key> | ||
| <integer>0</integer> | ||
| <key>kind</key> | ||
| <string>event</string> | ||
| <key>location</key> | ||
| <dict> | ||
| <key>col</key> | ||
| <integer>9</integer> | ||
| <key>file</key> | ||
| <integer>0</integer> | ||
| <key>line</key> | ||
| <integer>12</integer> | ||
| </dict> | ||
| <key>message</key> | ||
| <string>Assuming that condition 'z==0' is not redundant</string> | ||
| <key>ranges</key> | ||
| <array> | ||
| <array> | ||
| <dict> | ||
| <key>col</key> | ||
| <integer>9</integer> | ||
| <key>file</key> | ||
| <integer>0</integer> | ||
| <key>line</key> | ||
| <integer>12</integer> | ||
| </dict> | ||
| <dict> | ||
| <key>col</key> | ||
| <integer>9</integer> | ||
| <key>file</key> | ||
| <integer>0</integer> | ||
| <key>line</key> | ||
| <integer>12</integer> | ||
| </dict> | ||
| </array> | ||
| </array> | ||
| </dict> | ||
| <dict> | ||
| <key>depth</key> | ||
| <integer>0</integer> | ||
| <key>kind</key> | ||
| <string>event</string> | ||
| <key>location</key> | ||
| <dict> | ||
| <key>col</key> | ||
| <integer>15</integer> | ||
| <key>file</key> | ||
| <integer>0</integer> | ||
| <key>line</key> | ||
| <integer>13</integer> | ||
| </dict> | ||
| <key>message</key> | ||
| <string>Division by zero</string> | ||
| <key>ranges</key> | ||
| <array> | ||
| <array> | ||
| <dict> | ||
| <key>col</key> | ||
| <integer>15</integer> | ||
| <key>file</key> | ||
| <integer>0</integer> | ||
| <key>line</key> | ||
| <integer>13</integer> | ||
| </dict> | ||
| <dict> | ||
| <key>col</key> | ||
| <integer>15</integer> | ||
| <key>file</key> | ||
| <integer>0</integer> | ||
| <key>line</key> | ||
| <integer>13</integer> | ||
| </dict> | ||
| </array> | ||
| </array> | ||
| </dict> | ||
| <dict> | ||
| <key>depth</key> | ||
| <integer>0</integer> | ||
| <key>kind</key> | ||
| <string>event</string> | ||
| <key>location</key> | ||
| <dict> | ||
| <key>col</key> | ||
| <integer>15</integer> | ||
| <key>file</key> | ||
| <integer>0</integer> | ||
| <key>line</key> | ||
| <integer>13</integer> | ||
| </dict> | ||
| <key>message</key> | ||
| <string>Either the condition 'z==0' is redundant or there is division by zero at line 13.</string> | ||
| <key>ranges</key> | ||
| <array> | ||
| <array> | ||
| <dict> | ||
| <key>col</key> | ||
| <integer>15</integer> | ||
| <key>file</key> | ||
| <integer>0</integer> | ||
| <key>line</key> | ||
| <integer>13</integer> | ||
| </dict> | ||
| <dict> | ||
| <key>col</key> | ||
| <integer>15</integer> | ||
| <key>file</key> | ||
| <integer>0</integer> | ||
| <key>line</key> | ||
| <integer>13</integer> | ||
| </dict> | ||
| </array> | ||
| </array> | ||
| </dict> | ||
| </array> | ||
| </dict> | ||
| </array> | ||
| <key>files</key> | ||
| <array> | ||
| <string>divide_zero.cpp</string> | ||
| <string>lib.h</string> | ||
| </array> | ||
| <key>metadata</key> | ||
| <dict> | ||
| <key>analyzer</key> | ||
| <dict> | ||
| <key>name</key> | ||
| <string>cppcheck</string> | ||
| </dict> | ||
| <key>generated_by</key> | ||
| <dict> | ||
| <key>name</key> | ||
| <string>CodeChecker</string> | ||
| <key>version</key> | ||
| <string>6.29.0</string> | ||
| </dict> | ||
| </dict> | ||
| </dict> | ||
| </plist> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| // ------------------------------------------------------------------------- | ||
| // Part of the CodeChecker project, under the Apache License v2.0 with | ||
| // LLVM Exceptions. See LICENSE for license information. | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
| // ------------------------------------------------------------------------- | ||
|
|
||
| // core.DivideZero (C, C++, ObjC) | ||
| // Check for division by zero. | ||
|
|
||
| void div(int x) { | ||
| int y = x % 0; // warn | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.