Skip to content

Commit a4cd913

Browse files
authored
Merge pull request #10312 from erik-krogh/fix-caseDiff
ensure consistent casing of names
2 parents b488087 + 03a325c commit a4cd913

File tree

234 files changed

+727
-654
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

234 files changed

+727
-654
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
category: deprecated
3+
---
4+
* Some classes/modules with upper-case acronyms in their name have been renamed to follow our style-guide.
5+
The old name still exists as a deprecated alias.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
private import SSAConstruction as SSA
2-
import SSA::SsaConsistency
1+
private import SSAConstruction as Ssa
2+
import Ssa::SsaConsistency

cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/SSAConstruction.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,7 @@ deprecated module SSAConsistency = SsaConsistency;
11351135
* These predicates are all just aliases for predicates defined in the `Cached` module. This ensures
11361136
* that all of SSA construction will be evaluated in the same stage.
11371137
*/
1138-
module SSA {
1138+
module Ssa {
11391139
class MemoryLocation = Alias::MemoryLocation;
11401140

11411141
predicate hasPhiInstruction = Cached::hasPhiInstructionCached/2;
@@ -1144,3 +1144,6 @@ module SSA {
11441144

11451145
predicate hasUnreachedInstruction = Cached::hasUnreachedInstructionCached/1;
11461146
}
1147+
1148+
/** DEPRECATED: Alias for Ssa */
1149+
deprecated module SSA = Ssa;

cpp/ql/lib/semmle/code/cpp/ir/implementation/internal/TInstruction.qll

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,24 @@ newtype TInstruction =
2020
IRConstruction::Raw::hasInstruction(tag1, tag2)
2121
} or
2222
TUnaliasedSsaPhiInstruction(
23-
TRawInstruction blockStartInstr, UnaliasedSsa::SSA::MemoryLocation memoryLocation
23+
TRawInstruction blockStartInstr, UnaliasedSsa::Ssa::MemoryLocation memoryLocation
2424
) {
25-
UnaliasedSsa::SSA::hasPhiInstruction(blockStartInstr, memoryLocation)
25+
UnaliasedSsa::Ssa::hasPhiInstruction(blockStartInstr, memoryLocation)
2626
} or
2727
TUnaliasedSsaChiInstruction(TRawInstruction primaryInstruction) { none() } or
2828
TUnaliasedSsaUnreachedInstruction(IRFunctionBase irFunc) {
29-
UnaliasedSsa::SSA::hasUnreachedInstruction(irFunc)
29+
UnaliasedSsa::Ssa::hasUnreachedInstruction(irFunc)
3030
} or
3131
TAliasedSsaPhiInstruction(
32-
TRawInstruction blockStartInstr, AliasedSsa::SSA::MemoryLocation memoryLocation
32+
TRawInstruction blockStartInstr, AliasedSsa::Ssa::MemoryLocation memoryLocation
3333
) {
34-
AliasedSsa::SSA::hasPhiInstruction(blockStartInstr, memoryLocation)
34+
AliasedSsa::Ssa::hasPhiInstruction(blockStartInstr, memoryLocation)
3535
} or
3636
TAliasedSsaChiInstruction(TRawInstruction primaryInstruction) {
37-
AliasedSsa::SSA::hasChiInstruction(primaryInstruction)
37+
AliasedSsa::Ssa::hasChiInstruction(primaryInstruction)
3838
} or
3939
TAliasedSsaUnreachedInstruction(IRFunctionBase irFunc) {
40-
AliasedSsa::SSA::hasUnreachedInstruction(irFunc)
40+
AliasedSsa::Ssa::hasUnreachedInstruction(irFunc)
4141
}
4242

4343
/**
@@ -50,7 +50,7 @@ module UnaliasedSsaInstructions {
5050
class TPhiInstruction = TUnaliasedSsaPhiInstruction;
5151

5252
TPhiInstruction phiInstruction(
53-
TRawInstruction blockStartInstr, UnaliasedSsa::SSA::MemoryLocation memoryLocation
53+
TRawInstruction blockStartInstr, UnaliasedSsa::Ssa::MemoryLocation memoryLocation
5454
) {
5555
result = TUnaliasedSsaPhiInstruction(blockStartInstr, memoryLocation)
5656
}
@@ -83,7 +83,7 @@ module AliasedSsaInstructions {
8383
class TPhiInstruction = TAliasedSsaPhiInstruction or TUnaliasedSsaPhiInstruction;
8484

8585
TPhiInstruction phiInstruction(
86-
TRawInstruction blockStartInstr, AliasedSsa::SSA::MemoryLocation memoryLocation
86+
TRawInstruction blockStartInstr, AliasedSsa::Ssa::MemoryLocation memoryLocation
8787
) {
8888
result = TAliasedSsaPhiInstruction(blockStartInstr, memoryLocation)
8989
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
private import SSAConstruction as SSA
2-
import SSA::SsaConsistency
1+
private import SSAConstruction as Ssa
2+
import Ssa::SsaConsistency

cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,7 @@ deprecated module SSAConsistency = SsaConsistency;
11351135
* These predicates are all just aliases for predicates defined in the `Cached` module. This ensures
11361136
* that all of SSA construction will be evaluated in the same stage.
11371137
*/
1138-
module SSA {
1138+
module Ssa {
11391139
class MemoryLocation = Alias::MemoryLocation;
11401140

11411141
predicate hasPhiInstruction = Cached::hasPhiInstructionCached/2;
@@ -1144,3 +1144,6 @@ module SSA {
11441144

11451145
predicate hasUnreachedInstruction = Cached::hasUnreachedInstructionCached/1;
11461146
}
1147+
1148+
/** DEPRECATED: Alias for Ssa */
1149+
deprecated module SSA = Ssa;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
category: deprecated
3+
---
4+
* Some classes/modules with upper-case acronyms in their name have been renamed to follow our style-guide.
5+
The old name still exists as a deprecated alias.

csharp/ql/lib/semmle/code/cil/CallableReturns.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ private predicate alwaysNotNullVariableUpdate(VariableUpdate vu) {
5656

5757
/** Holds if expression `expr` always evaluates to non-null. */
5858
private predicate alwaysNotNullExpr(Expr expr) {
59-
expr instanceof Opcodes::Newobj
59+
expr instanceof Opcodes::NewObj
6060
or
6161
expr instanceof Literal and not expr instanceof NullLiteral
6262
or

csharp/ql/lib/semmle/code/cil/Instructions.qll

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ module Opcodes {
766766
}
767767

768768
/** A `newobj` instruction. */
769-
class Newobj extends Call, @cil_newobj {
769+
class NewObj extends Call, @cil_newobj {
770770
override string getOpcodeName() { result = "newobj" }
771771

772772
override int getPushCount() { result = 1 }
@@ -788,6 +788,9 @@ module Opcodes {
788788
}
789789
}
790790

791+
/** DEPRECATED: Alias for NewObj */
792+
deprecated class Newobj = NewObj;
793+
791794
/** An `initobj` instruction. */
792795
class Initobj extends Instruction, @cil_initobj {
793796
override string getOpcodeName() { result = "initobj" }
@@ -847,10 +850,13 @@ module Opcodes {
847850
}
848851

849852
/** A `rethrow` instruction. */
850-
class Rethrow extends Throw, @cil_rethrow {
853+
class ReThrow extends Throw, @cil_rethrow {
851854
override string getOpcodeName() { result = "rethrow" }
852855
}
853856

857+
/** DEPRECATED: Alias for ReThrow */
858+
deprecated class Rethrow = ReThrow;
859+
854860
/** A `ldlen` instruction. */
855861
class Ldlen extends UnaryExpr, @cil_ldlen {
856862
override string getOpcodeName() { result = "ldlen" }

csharp/ql/src/experimental/ir/implementation/internal/AliasedSSAStub.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
private import IRFunctionBase
77
private import TInstruction
88

9-
module SSA {
9+
module Ssa {
1010
class MemoryLocation = boolean;
1111

1212
predicate hasPhiInstruction(TRawInstruction blockStartInstr, MemoryLocation memoryLocation) {
@@ -17,3 +17,6 @@ module SSA {
1717

1818
predicate hasUnreachedInstruction(IRFunctionBase irFunc) { none() }
1919
}
20+
21+
/** DEPRECATED: Alias for Ssa */
22+
deprecated module SSA = Ssa;

csharp/ql/src/experimental/ir/implementation/internal/TInstruction.qll

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,24 @@ newtype TInstruction =
2020
IRConstruction::Raw::hasInstruction(tag1, tag2)
2121
} or
2222
TUnaliasedSsaPhiInstruction(
23-
TRawInstruction blockStartInstr, UnaliasedSsa::SSA::MemoryLocation memoryLocation
23+
TRawInstruction blockStartInstr, UnaliasedSsa::Ssa::MemoryLocation memoryLocation
2424
) {
25-
UnaliasedSsa::SSA::hasPhiInstruction(blockStartInstr, memoryLocation)
25+
UnaliasedSsa::Ssa::hasPhiInstruction(blockStartInstr, memoryLocation)
2626
} or
2727
TUnaliasedSsaChiInstruction(TRawInstruction primaryInstruction) { none() } or
2828
TUnaliasedSsaUnreachedInstruction(IRFunctionBase irFunc) {
29-
UnaliasedSsa::SSA::hasUnreachedInstruction(irFunc)
29+
UnaliasedSsa::Ssa::hasUnreachedInstruction(irFunc)
3030
} or
3131
TAliasedSsaPhiInstruction(
32-
TRawInstruction blockStartInstr, AliasedSsa::SSA::MemoryLocation memoryLocation
32+
TRawInstruction blockStartInstr, AliasedSsa::Ssa::MemoryLocation memoryLocation
3333
) {
34-
AliasedSsa::SSA::hasPhiInstruction(blockStartInstr, memoryLocation)
34+
AliasedSsa::Ssa::hasPhiInstruction(blockStartInstr, memoryLocation)
3535
} or
3636
TAliasedSsaChiInstruction(TRawInstruction primaryInstruction) {
37-
AliasedSsa::SSA::hasChiInstruction(primaryInstruction)
37+
AliasedSsa::Ssa::hasChiInstruction(primaryInstruction)
3838
} or
3939
TAliasedSsaUnreachedInstruction(IRFunctionBase irFunc) {
40-
AliasedSsa::SSA::hasUnreachedInstruction(irFunc)
40+
AliasedSsa::Ssa::hasUnreachedInstruction(irFunc)
4141
}
4242

4343
/**
@@ -50,7 +50,7 @@ module UnaliasedSsaInstructions {
5050
class TPhiInstruction = TUnaliasedSsaPhiInstruction;
5151

5252
TPhiInstruction phiInstruction(
53-
TRawInstruction blockStartInstr, UnaliasedSsa::SSA::MemoryLocation memoryLocation
53+
TRawInstruction blockStartInstr, UnaliasedSsa::Ssa::MemoryLocation memoryLocation
5454
) {
5555
result = TUnaliasedSsaPhiInstruction(blockStartInstr, memoryLocation)
5656
}
@@ -83,7 +83,7 @@ module AliasedSsaInstructions {
8383
class TPhiInstruction = TAliasedSsaPhiInstruction or TUnaliasedSsaPhiInstruction;
8484

8585
TPhiInstruction phiInstruction(
86-
TRawInstruction blockStartInstr, AliasedSsa::SSA::MemoryLocation memoryLocation
86+
TRawInstruction blockStartInstr, AliasedSsa::Ssa::MemoryLocation memoryLocation
8787
) {
8888
result = TAliasedSsaPhiInstruction(blockStartInstr, memoryLocation)
8989
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
private import SSAConstruction as SSA
2-
import SSA::SsaConsistency
1+
private import SSAConstruction as Ssa
2+
import Ssa::SsaConsistency

csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,7 @@ deprecated module SSAConsistency = SsaConsistency;
11351135
* These predicates are all just aliases for predicates defined in the `Cached` module. This ensures
11361136
* that all of SSA construction will be evaluated in the same stage.
11371137
*/
1138-
module SSA {
1138+
module Ssa {
11391139
class MemoryLocation = Alias::MemoryLocation;
11401140

11411141
predicate hasPhiInstruction = Cached::hasPhiInstructionCached/2;
@@ -1144,3 +1144,6 @@ module SSA {
11441144

11451145
predicate hasUnreachedInstruction = Cached::hasUnreachedInstructionCached/1;
11461146
}
1147+
1148+
/** DEPRECATED: Alias for Ssa */
1149+
deprecated module SSA = Ssa;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
category: deprecated
3+
---
4+
* Some classes/modules with upper-case acronyms in their name have been renamed to follow our style-guide.
5+
The old name still exists as a deprecated alias.

go/ql/lib/semmle/go/concepts/HTTP.qll

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import go
66

77
/** Provides classes for modeling HTTP-related APIs. */
8-
module HTTP {
8+
module Http {
99
/** Provides a class for modeling new HTTP response-writer APIs. */
1010
module ResponseWriter {
1111
/**
@@ -179,7 +179,7 @@ module HTTP {
179179

180180
/** Gets a content-type associated with this body. */
181181
string getAContentType() {
182-
exists(HTTP::HeaderWrite hw | hw = this.getResponseWriter().getAHeaderWrite() |
182+
exists(Http::HeaderWrite hw | hw = this.getResponseWriter().getAHeaderWrite() |
183183
hw.getHeaderName() = "content-type" and
184184
result = hw.getHeaderValue()
185185
)
@@ -189,7 +189,7 @@ module HTTP {
189189

190190
/** Gets a dataflow node for a content-type associated with this body. */
191191
DataFlow::Node getAContentTypeNode() {
192-
exists(HTTP::HeaderWrite hw | hw = this.getResponseWriter().getAHeaderWrite() |
192+
exists(Http::HeaderWrite hw | hw = this.getResponseWriter().getAHeaderWrite() |
193193
hw.getHeaderName() = "content-type" and
194194
result = hw.getValue()
195195
)
@@ -346,3 +346,6 @@ module HTTP {
346346
predicate guardedBy(DataFlow::Node check) { super.guardedBy(check) }
347347
}
348348
}
349+
350+
/** DEPRECATED: Alias for Http */
351+
deprecated module HTTP = Http;

go/ql/lib/semmle/go/frameworks/Beego.qll

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ module Beego {
114114
}
115115
}
116116

117-
private class BeegoOutputInstance extends HTTP::ResponseWriter::Range {
117+
private class BeegoOutputInstance extends Http::ResponseWriter::Range {
118118
SsaWithFields v;
119119

120120
BeegoOutputInstance() {
@@ -131,7 +131,7 @@ module Beego {
131131
}
132132
}
133133

134-
private class BeegoHeaderWrite extends HTTP::HeaderWrite::Range, DataFlow::MethodCallNode {
134+
private class BeegoHeaderWrite extends Http::HeaderWrite::Range, DataFlow::MethodCallNode {
135135
string methodName;
136136

137137
BeegoHeaderWrite() {
@@ -142,7 +142,7 @@ module Beego {
142142
override DataFlow::Node getName() { methodName = "Header" and result = this.getArgument(0) }
143143

144144
override string getHeaderName() {
145-
result = HTTP::HeaderWrite::Range.super.getHeaderName()
145+
result = Http::HeaderWrite::Range.super.getHeaderName()
146146
or
147147
methodName = "ContentType" and result = "content-type"
148148
}
@@ -153,12 +153,12 @@ module Beego {
153153
else result = this.getArgument(1)
154154
}
155155

156-
override HTTP::ResponseWriter getResponseWriter() {
156+
override Http::ResponseWriter getResponseWriter() {
157157
result.(BeegoOutputInstance).getAHeaderObject() = this
158158
}
159159
}
160160

161-
private class BeegoResponseBody extends HTTP::ResponseBody::Range {
161+
private class BeegoResponseBody extends Http::ResponseBody::Range {
162162
DataFlow::MethodCallNode call;
163163
string methodName;
164164

@@ -170,7 +170,7 @@ module Beego {
170170
methodName in ["Body", "JSON", "JSONP", "ServeFormatted", "XML", "YAML"]
171171
}
172172

173-
override HTTP::ResponseWriter getResponseWriter() { result.getANode() = call.getReceiver() }
173+
override Http::ResponseWriter getResponseWriter() { result.getANode() = call.getReceiver() }
174174

175175
override string getAContentType() {
176176
// Super-method provides content-types for `Body`, which requires us to search
@@ -192,7 +192,7 @@ module Beego {
192192
}
193193
}
194194

195-
private class ControllerResponseBody extends HTTP::ResponseBody::Range {
195+
private class ControllerResponseBody extends Http::ResponseBody::Range {
196196
string name;
197197

198198
ControllerResponseBody() {
@@ -203,7 +203,7 @@ module Beego {
203203
)
204204
}
205205

206-
override HTTP::ResponseWriter getResponseWriter() { none() }
206+
override Http::ResponseWriter getResponseWriter() { none() }
207207

208208
override string getAContentType() {
209209
// Actually SetData can serve JSON, XML or YAML depending on the incoming
@@ -213,7 +213,7 @@ module Beego {
213213
}
214214
}
215215

216-
private class ContextResponseBody extends HTTP::ResponseBody::Range {
216+
private class ContextResponseBody extends Http::ResponseBody::Range {
217217
string name;
218218

219219
ContextResponseBody() {
@@ -224,7 +224,7 @@ module Beego {
224224
)
225225
}
226226

227-
override HTTP::ResponseWriter getResponseWriter() { none() }
227+
override Http::ResponseWriter getResponseWriter() { none() }
228228

229229
// Neither method is likely to be used with well-typed data such as JSON output,
230230
// because there are better methods to do this. Assume the Content-Type could
@@ -314,7 +314,7 @@ module Beego {
314314
}
315315
}
316316

317-
private class RedirectMethods extends HTTP::Redirect::Range, DataFlow::CallNode {
317+
private class RedirectMethods extends Http::Redirect::Range, DataFlow::CallNode {
318318
string package;
319319
string className;
320320

@@ -333,7 +333,7 @@ module Beego {
333333
className = "Context" and result = this.getArgument(1)
334334
}
335335

336-
override HTTP::ResponseWriter getResponseWriter() { none() }
336+
override Http::ResponseWriter getResponseWriter() { none() }
337337
}
338338

339339
private class UtilsTaintPropagators extends TaintTracking::FunctionModel {

0 commit comments

Comments
 (0)