From aa28c945622fa72259ee4d8e9818db1db0f58ff2 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Wed, 4 Mar 2026 14:12:42 +0000 Subject: [PATCH] Remove double space after $ in inline expectations tests --- .../library-tests/dataflow/models-as-data/tests.cpp | 2 +- .../test/library-tests/dataflow/taint-tests/taint.cpp | 4 ++-- .../intent/TestStartBroadcastReceiverToIntent.java | 2 +- python/ql/test/library-tests/ApiGraphs/py3/test.py | 2 +- python/ql/test/library-tests/dataflow/coverage/test.py | 2 +- .../library-tests/frameworks/ruamel.yaml/Decoding.py | 10 +++++----- .../test/query-tests/security/CWE-312/test_logging.rs | 2 +- .../dataflow/taint/libraries/nsstring.swift | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/cpp/ql/test/library-tests/dataflow/models-as-data/tests.cpp b/cpp/ql/test/library-tests/dataflow/models-as-data/tests.cpp index 12de5419ec7..cb2bf965083 100644 --- a/cpp/ql/test/library-tests/dataflow/models-as-data/tests.cpp +++ b/cpp/ql/test/library-tests/dataflow/models-as-data/tests.cpp @@ -75,7 +75,7 @@ void test_sources() { int e = localMadSource(); sink(e); // $ ir - sink(MyNamespace::namespaceLocalMadSource()); // $ ir + sink(MyNamespace::namespaceLocalMadSource()); // $ ir sink(MyNamespace::namespaceLocalMadSourceVar); // $ ir sink(MyNamespace::MyNamespace2::namespace2LocalMadSource()); // $ ir sink(MyNamespace::localMadSource()); // $ (the MyNamespace version of this function is not a source) diff --git a/cpp/ql/test/library-tests/dataflow/taint-tests/taint.cpp b/cpp/ql/test/library-tests/dataflow/taint-tests/taint.cpp index 70d5b8c7b00..fa32e192239 100644 --- a/cpp/ql/test/library-tests/dataflow/taint-tests/taint.cpp +++ b/cpp/ql/test/library-tests/dataflow/taint-tests/taint.cpp @@ -450,7 +450,7 @@ void test_qualifiers() b.member = source(); sink(b); // $ ir MISSING: ast sink(b.member); // $ ast,ir - sink(b.getMember()); // $ MISSING: ir ast + sink(b.getMember()); // $ MISSING: ir ast c = new MyClass2(0); @@ -865,4 +865,4 @@ void test_iconv(size_t size) { size_t size_out; iconv(0, &s, &size, &p, &size_out); sink(*p); // $ ast,ir -} \ No newline at end of file +} diff --git a/java/ql/test/library-tests/frameworks/android/intent/TestStartBroadcastReceiverToIntent.java b/java/ql/test/library-tests/frameworks/android/intent/TestStartBroadcastReceiverToIntent.java index f317b3ed2e8..22be5f8534e 100644 --- a/java/ql/test/library-tests/frameworks/android/intent/TestStartBroadcastReceiverToIntent.java +++ b/java/ql/test/library-tests/frameworks/android/intent/TestStartBroadcastReceiverToIntent.java @@ -79,7 +79,7 @@ public class TestStartBroadcastReceiverToIntent { // test method that receives an Intent as a parameter @Override public void onReceive(Context context, Intent intent) { - sink(intent.getStringExtra("data")); // $ hasValueFlow=send hasValueFlow=send-as-user hasValueFlow=send-with-perm hasValueFlow=send-ordered hasValueFlow=send-ordered-as-user hasValueFlow=send-sticky hasValueFlow=send-sticky-as-user hasValueFlow=send-sticky-ordered hasValueFlow=send-sticky-ordered-as-user hasValueFlow=4-arg + sink(intent.getStringExtra("data")); // $ hasValueFlow=send hasValueFlow=send-as-user hasValueFlow=send-with-perm hasValueFlow=send-ordered hasValueFlow=send-ordered-as-user hasValueFlow=send-sticky hasValueFlow=send-sticky-as-user hasValueFlow=send-sticky-ordered hasValueFlow=send-sticky-ordered-as-user hasValueFlow=4-arg } } diff --git a/python/ql/test/library-tests/ApiGraphs/py3/test.py b/python/ql/test/library-tests/ApiGraphs/py3/test.py index 350c213a005..4c48e1f1dae 100644 --- a/python/ql/test/library-tests/ApiGraphs/py3/test.py +++ b/python/ql/test/library-tests/ApiGraphs/py3/test.py @@ -8,7 +8,7 @@ x2 = m2.blah2 # $ use=moduleImport("a2").getMember("blah2") import a3.b3 as m3 # $ use=moduleImport("a3").getMember("b3") -x3 = m3.blah3 # $ use=moduleImport("a3").getMember("b3").getMember("blah3") +x3 = m3.blah3 # $ use=moduleImport("a3").getMember("b3").getMember("blah3") from a4.b4 import c4 as m4 # $ use=moduleImport("a4").getMember("b4").getMember("c4") diff --git a/python/ql/test/library-tests/dataflow/coverage/test.py b/python/ql/test/library-tests/dataflow/coverage/test.py index 9d2299123f9..5f13ba5a403 100644 --- a/python/ql/test/library-tests/dataflow/coverage/test.py +++ b/python/ql/test/library-tests/dataflow/coverage/test.py @@ -106,7 +106,7 @@ def test_list_comprehension(): def test_list_comprehension_flow(): x = [y for y in [SOURCE]] - SINK(x[0]) # $ flow="SOURCE, l:-1 -> x[0]" + SINK(x[0]) # $ flow="SOURCE, l:-1 -> x[0]" def test_list_comprehension_inflow(): diff --git a/python/ql/test/library-tests/frameworks/ruamel.yaml/Decoding.py b/python/ql/test/library-tests/frameworks/ruamel.yaml/Decoding.py index 99648fbbad0..0e0d4d00f33 100644 --- a/python/ql/test/library-tests/frameworks/ruamel.yaml/Decoding.py +++ b/python/ql/test/library-tests/frameworks/ruamel.yaml/Decoding.py @@ -6,27 +6,27 @@ ruamel.yaml.load(stream=payload) # $ decodeInput=payload decodeOutput=ruamel.ya ruamel.yaml.load(payload, ruamel.yaml.Loader) # $ decodeInput=payload decodeOutput=ruamel.yaml.load(..) decodeFormat=YAML decodeMayExecuteInput # Safe: -ruamel.yaml.load(payload, ruamel.yaml.SafeLoader) # $ decodeInput=payload decodeOutput=ruamel.yaml.load(..) decodeFormat=YAML +ruamel.yaml.load(payload, ruamel.yaml.SafeLoader) # $ decodeInput=payload decodeOutput=ruamel.yaml.load(..) decodeFormat=YAML ruamel.yaml.load(payload, Loader=ruamel.yaml.SafeLoader) # $ decodeInput=payload decodeOutput=ruamel.yaml.load(..) decodeFormat=YAML ruamel.yaml.load(payload, ruamel.yaml.BaseLoader) # $ decodeInput=payload decodeOutput=ruamel.yaml.load(..) decodeFormat=YAML -ruamel.yaml.safe_load(payload) # $ decodeInput=payload decodeOutput=ruamel.yaml.safe_load(..) decodeFormat=YAML +ruamel.yaml.safe_load(payload) # $ decodeInput=payload decodeOutput=ruamel.yaml.safe_load(..) decodeFormat=YAML ################################################################################ # load_all variants ################################################################################ # Unsafe: -ruamel.yaml.load_all(payload) # $ decodeInput=payload decodeOutput=ruamel.yaml.load_all(..) decodeFormat=YAML decodeMayExecuteInput +ruamel.yaml.load_all(payload) # $ decodeInput=payload decodeOutput=ruamel.yaml.load_all(..) decodeFormat=YAML decodeMayExecuteInput # Safe: -ruamel.yaml.safe_load_all(payload) # $ decodeInput=payload decodeOutput=ruamel.yaml.safe_load_all(..) decodeFormat=YAML +ruamel.yaml.safe_load_all(payload) # $ decodeInput=payload decodeOutput=ruamel.yaml.safe_load_all(..) decodeFormat=YAML ################################################################################ # C-based loaders with `libyaml` ################################################################################ # Unsafe: -ruamel.yaml.load(payload, ruamel.yaml.CLoader) # $ decodeInput=payload decodeOutput=ruamel.yaml.load(..) decodeFormat=YAML decodeMayExecuteInput +ruamel.yaml.load(payload, ruamel.yaml.CLoader) # $ decodeInput=payload decodeOutput=ruamel.yaml.load(..) decodeFormat=YAML decodeMayExecuteInput # Safe: ruamel.yaml.load(payload, ruamel.yaml.CSafeLoader) # $ decodeInput=payload decodeOutput=ruamel.yaml.load(..) decodeFormat=YAML diff --git a/rust/ql/test/query-tests/security/CWE-312/test_logging.rs b/rust/ql/test/query-tests/security/CWE-312/test_logging.rs index 02451c92d91..43bcd8894f3 100644 --- a/rust/ql/test/query-tests/security/CWE-312/test_logging.rs +++ b/rust/ql/test/query-tests/security/CWE-312/test_logging.rs @@ -97,7 +97,7 @@ fn test_log(harmless: String, password: String, encrypted_password: String) { info!("{}", m2); // $ Alert[rust/cleartext-logging]=m2 let m3 = format!("message = {}", password); // $ Source[rust/cleartext-logging]=m3 - info!("{}", m3); // $ Alert[rust/cleartext-logging]=m3 + info!("{}", m3); // $ Alert[rust/cleartext-logging]=m3 let mut m4 = String::new(); write!(&mut m4, "message = {}", password); // $ MISSING: Source=m4 diff --git a/swift/ql/test/library-tests/dataflow/taint/libraries/nsstring.swift b/swift/ql/test/library-tests/dataflow/taint/libraries/nsstring.swift index a87b0dde9b1..3093f151d33 100644 --- a/swift/ql/test/library-tests/dataflow/taint/libraries/nsstring.swift +++ b/swift/ql/test/library-tests/dataflow/taint/libraries/nsstring.swift @@ -203,7 +203,7 @@ func taintThroughInterpolatedStrings() { sink(arg: try! NSString(contentsOfFile: sourceString(), encoding: 0)) // $ tainted=204 sink(arg: try! NSString(contentsOfFile: sourceString(), usedEncoding: nil)) // $ tainted=205 - sink(arg: try! NSString(contentsOf: sourceURL(), encoding: 0)) // $ tainted=206 + sink(arg: try! NSString(contentsOf: sourceURL(), encoding: 0)) // $ tainted=206 sink(arg: try! NSString(contentsOf: URL(string: sourceString())!, encoding: 0)) // $ tainted=207 sink(arg: try! NSString(contentsOf: sourceURL(), usedEncoding: nil)) // $ tainted=208 sink(arg: try! NSString(contentsOf: URL(string: sourceString())!, usedEncoding: nil)) // $ tainted=209