Skip to content

Commit aa13687

Browse files
committed
rename suspicious-method-name to suspicious-method-name-declaration
1 parent 0320f0f commit aa13687

File tree

9 files changed

+5
-5
lines changed

9 files changed

+5
-5
lines changed

change-notes/1.23/analysis-javascript.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
|---------------------------------------------------------------------------|-------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
1717
| Unused index variable (`js/unused-index-variable`) | correctness | Highlights loops that iterate over an array, but do not use the index variable to access array elements, indicating a possible typo or logic error. Results are shown on LGTM by default. |
1818
| Loop bound injection (`js/loop-bound-injection`) | security, external/cwe/cwe-834 | Highlights loops where a user-controlled object with an arbitrary .length value can trick the server to loop indefinitely. Results are not shown on LGTM by default. |
19-
| Suspicious method name (`js/suspicious-method-name`) | correctness, typescript, methods | Highlights suspiciously named methods where the developer likely meant to write a constructor or function. Results are shown on LGTM by default. |
19+
| Suspicious method name (`js/suspicious-method-name-declaration`) | correctness, typescript, methods | Highlights suspiciously named methods where the developer likely meant to write a constructor or function. Results are shown on LGTM by default. |
2020

2121
## Changes to existing queries
2222

javascript/ql/src/Declarations/SuspiciousMethodName.qhelp renamed to javascript/ql/src/Declarations/SuspiciousMethodNameDeclaration.qhelp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ and a method called <code>constructor</code>. The interface does not declare
3333
a class <code>Point</code> with a constructor, which was likely what the
3434
developer meant to create.
3535
</p>
36-
<sample src="examples/SuspiciousMethodName.ts" />
36+
<sample src="examples/SuspiciousMethodNameDeclaration.ts" />
3737

3838
<p>
3939
The below example is a fixed version of the above, where the interface is
4040
instead declared as a class, thereby describing the type the developer meant
4141
in the first place.
4242
</p>
4343

44-
<sample src="examples/SuspiciousMethodNameFixed.ts" />
44+
<sample src="examples/SuspiciousMethodNameDeclarationFixed.ts" />
4545

4646
</example>
4747
<references>

javascript/ql/src/Declarations/SuspiciousMethodName.ql renamed to javascript/ql/src/Declarations/SuspiciousMethodNameDeclaration.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/**
2-
* @name Suspicious method name
2+
* @name Suspicious method name declaration
33
* @description A method having the name "function", "new", or "constructor"
44
* is usually caused by a programmer being confused about the TypeScript syntax.
55
* @kind problem
66
* @problem.severity warning
7-
* @id js/suspicious-method-name
7+
* @id js/suspicious-method-name-declaration
88
* @precision high
99
* @tags correctness
1010
* typescript

javascript/ql/src/Declarations/examples/SuspiciousMethodName.ts renamed to javascript/ql/src/Declarations/examples/SuspiciousMethodNameDeclaration.ts

File renamed without changes.

javascript/ql/src/Declarations/examples/SuspiciousMethodNameFixed.ts renamed to javascript/ql/src/Declarations/examples/SuspiciousMethodNameDeclarationFixed.ts

File renamed without changes.

javascript/ql/test/query-tests/Declarations/SuspiciousMethodName/SuspiciousMethodName.expected renamed to javascript/ql/test/query-tests/Declarations/SuspiciousMethodNameDeclaration/SuspiciousMethodNameDeclaration.expected

File renamed without changes.

javascript/ql/test/query-tests/Declarations/SuspiciousMethodName/SuspiciousMethodName.qlref renamed to javascript/ql/test/query-tests/Declarations/SuspiciousMethodNameDeclaration/SuspiciousMethodNameDeclaration.qlref

File renamed without changes.

javascript/ql/test/query-tests/Declarations/SuspiciousMethodName/tst.js renamed to javascript/ql/test/query-tests/Declarations/SuspiciousMethodNameDeclaration/tst.js

File renamed without changes.

javascript/ql/test/query-tests/Declarations/SuspiciousMethodName/tst.ts renamed to javascript/ql/test/query-tests/Declarations/SuspiciousMethodNameDeclaration/tst.ts

File renamed without changes.

0 commit comments

Comments
 (0)