-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Test: Support arbitrary locations in inline test post-processor #18735
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 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a1c3dca
JS: Convert OK-style to $-style expectations in one test
asgerf fb79ab1
JS: Update line numbers
asgerf 84c02d0
JS: Enable test post-processing
asgerf 5b0eb0f
JS: Move an Alert annotation to its correct line
asgerf 967c086
Test: support queries that don't select a Location
asgerf 56ff935
JS: Update test output again
asgerf 80e79b1
Apply suggestions from code review
asgerf c306f44
Remove override of final predicate
asgerf 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
3 changes: 2 additions & 1 deletion
3
javascript/ql/test/query-tests/AngularJS/DuplicateDependency/DuplicateDependency.qlref
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 |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| AngularJS/DuplicateDependency.ql | ||
| query: AngularJS/DuplicateDependency.ql | ||
| postprocess: utils/test/InlineExpectationsTestQuery.ql |
24 changes: 12 additions & 12 deletions
24
javascript/ql/test/query-tests/AngularJS/DuplicateDependency/duplicates.js
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 |
|---|---|---|
| @@ -1,18 +1,18 @@ | ||
| (function(){ | ||
| function f(){} | ||
| f.$inject = ['dup5', 'dup5']; // NOT OK | ||
| function f(){} // $ Alert | ||
| f.$inject = ['dup5', 'dup5']; | ||
| angular.module('myModule', []) | ||
| .run(['dup1a', 'dup1a', function(dup1a, dup1a){}]) // OK (flagged by js/duplicate-parameter-name) | ||
| .run(['dup2a', 'dup2a', function(dup2a, dup2b){}]) // NOT OK | ||
| .run(['dup3b', 'dup3b', function(dup3a, dup3b){}]) // NOT OK | ||
| .run(['dup4', 'notDup4A', 'dup4', function(notDup4B, dup4, notDup4C){}]) // NOT OK | ||
| .run(['dup1a', 'dup1a', function(dup1a, dup1a){}]) // OK - flagged by js/duplicate-parameter-name | ||
| .run(['dup2a', 'dup2a', function(dup2a, dup2b){}]) // $ Alert | ||
| .run(['dup3b', 'dup3b', function(dup3a, dup3b){}]) // $ Alert | ||
| .run(['dup4', 'notDup4A', 'dup4', function(notDup4B, dup4, notDup4C){}]) // $ Alert | ||
| .run(f) | ||
| .run(function(dup6, dup6){})// OK (flagged by js/duplicate-parameter-name) | ||
| .run(function(notDup7a, notDup7b){}) // OK | ||
| .run(['notDup8a', 'notDup8b', function(notDup8a, notDup8b){}]) // OK | ||
| .run(['notDup9a', 'notDup9b', function(notDup9c, notDup9d){}]) // OK | ||
| .run(['dup10a', 'dup10a', 'dup10a', function(dup10a, dup10a, dup10a){}]) // OK (flagged by js/duplicate-parameter-name) | ||
| .run(['dup11a', 'dup11a', function(dup11a, dup11b){ // NOT OK (alert formatting for multi-line function) | ||
| .run(function(dup6, dup6){})// OK - flagged by js/duplicate-parameter-name | ||
| .run(function(notDup7a, notDup7b){}) | ||
| .run(['notDup8a', 'notDup8b', function(notDup8a, notDup8b){}]) | ||
| .run(['notDup9a', 'notDup9b', function(notDup9c, notDup9d){}]) | ||
| .run(['dup10a', 'dup10a', 'dup10a', function(dup10a, dup10a, dup10a){}]) // OK - flagged by js/duplicate-parameter-name | ||
| .run(['dup11a', 'dup11a', function(dup11a, dup11b){ // $ Alert - alert formatting for multi-line function | ||
| }]) | ||
| ; | ||
| })(); |
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
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.