-
Notifications
You must be signed in to change notification settings - Fork 440
Fix over-eager file matching in skip files and --file option
#4670
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
Open
furtib
wants to merge
29
commits into
Ericsson:master
Choose a base branch
from
furtib:file-no-regex
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
b921855
Remove '*' from skip file discorvery to match documentation better
furtib b1ac6f6
Add '*' to entries that trivially folders
furtib 2a446da
Revert "Add '*' to entries that trivially folders"
furtib b6611bb
Add in regex to only match all files if the specified input is a dire…
furtib f8631e2
Fix regex, add comment explaining what does it do
furtib 8f50005
More sophisticated removal of '\Z' in skip file regex
furtib f257c4a
Handle windows paths correctly in skipfiles
furtib e00c115
Update platform specific separator
furtib 866e094
Escape that separator every time
furtib d9c18f2
Remove the version specific line
furtib 3da5dce
Remove unnecesarry import
furtib 14178f3
Generalyze analyze command
furtib 529357d
Add test for filenames that are prefixes for each other
furtib 63af120
Add test for folder skip recognition
furtib f9eff85
Remove trailing whitespaces
furtib c3063fa
Fix linting errors
furtib 8518071
Fix typos, filenames, and Makefiles
furtib 40225a1
Rewrite test to be more extensible
furtib 430127f
Comment skip_directory test
furtib 38f9a6b
Fix lint errors
furtib ecf1151
Fix test
furtib 7fa325b
change *.o to $(obgs)
furtib b776f74
Remove unnecesary space
furtib 5a6c54e
Change skipme/*.o to $(OBJS)
furtib be82c4c
Update comment in analyzer/tests/functional/skip/test_skip.py
furtib 089144e
Update comment in analyzer/tests/functional/skip/test_skip.py
furtib 83be98a
Remove unnecesary space
furtib 4efe0c4
Fix comments and make files
furtib c535737
Fragment comment to avoid too long line
furtib 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
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
analyzer/tests/functional/skip/test_files/similar/Makefile
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,21 @@ | ||
| C_OBJS = $(C_SRCS:.c=_c.o) | ||
| CPP_OBJS = $(CPP_SRCS:.cpp=_cpp.o) | ||
|
|
||
| OBJS = $(C_OBJS) $(CPP_OBJS) | ||
|
|
||
| CXXFLAGS += -Wno-all -Wno-extra -Wno-division-by-zero | ||
| CFLAGS += -Wno-division-by-zero | ||
|
|
||
| C_SRCS = simple.c | ||
| CPP_SRCS = simple.cpp | ||
|
|
||
| all: $(OBJS) | ||
|
|
||
| $(CPP_OBJS): %_cpp.o: %.cpp | ||
| $(CXX) $(CXXFLAGS) -c $< -o $@ | ||
|
|
||
| $(C_OBJS): %_c.o: %.c | ||
| $(CC) $(CFLAGS) -c $< -o $@ | ||
|
|
||
| clean: | ||
| rm -rf $(OBJS) | ||
13 changes: 13 additions & 0 deletions
13
analyzer/tests/functional/skip/test_files/similar/simple.c
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,13 @@ | ||
| // ------------------------------------------------------------------------- | ||
| // 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 | ||
| // ------------------------------------------------------------------------- | ||
|
|
||
| // This file is to be included in a --file argument. | ||
|
|
||
| void main(int z) { | ||
| int x; | ||
| if (z == 0) | ||
| x = 1 / z; // warn | ||
| } |
12 changes: 12 additions & 0 deletions
12
analyzer/tests/functional/skip/test_files/similar/simple.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,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 | ||
| // ------------------------------------------------------------------------- | ||
|
|
||
| // This file is not to be added to a --file argument. | ||
|
|
||
| void skipped_test(int z) { | ||
| if (z == 0) | ||
| int x = 1 / z; // warn | ||
| } |
13 changes: 13 additions & 0 deletions
13
analyzer/tests/functional/skip/test_files/skip_folder/Makefile
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,13 @@ | ||
| OBJS = $(SRCS:.cpp=.o) | ||
|
|
||
| CXXFLAGS += -Wno-all -Wno-extra -Wno-division-by-zero | ||
|
|
||
| SRCS = skipme/skipme.cpp | ||
|
|
||
| all: $(OBJS) | ||
|
|
||
| .cpp.o: | ||
| $(CXX) $(CXXFLAGS) -c $< -o $@ | ||
|
|
||
| clean: | ||
| rm -rf $(OBJS) |
12 changes: 12 additions & 0 deletions
12
analyzer/tests/functional/skip/test_files/skip_folder/skipme/skipme.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,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 | ||
| // ------------------------------------------------------------------------- | ||
|
|
||
| // This file is to be included in a skip list file. | ||
|
|
||
| void skipped_test(int z) { | ||
| if (z == 0) | ||
| int x = 1 / z; // warn | ||
| } |
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
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
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.