Skip to content

Commit 95a131d

Browse files
Update help text
1 parent 8ee36a5 commit 95a131d

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

java/ql/src/utils/flowtestcasegenerator/GenerateFlowTestCase.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,14 @@
1313

1414
if any(s == "--help" for s in sys.argv):
1515
print("""Usage:
16-
GenerateFlowTestCase.py specsToTest.csv projectPom.xml outdir [--force]
16+
GenerateFlowTestCase.py specsToTest projectPom.xml outdir [--force]
1717
18-
This generates test cases exercising function model specifications found in specsToTest.csv
18+
This generates test cases exercising function model specifications found in specsToTest
1919
producing files Test.java, test.ql, test.ext.yml and test.expected in outdir.
2020
21+
specsToTest should either be a .csv file, a .yml file, or a directory of .yml files, containing the
22+
model specifications to test.
23+
2124
projectPom.xml should be a Maven pom sufficient to resolve the classes named in specsToTest.csv.
2225
Typically this means supplying a skeleton POM <dependencies> section that retrieves whatever jars
2326
contain the needed classes.
@@ -40,9 +43,10 @@
4043

4144
if len(sys.argv) != 4:
4245
print(
43-
"Usage: GenerateFlowTestCase.py specsToTest.csv projectPom.xml outdir [--force]", file=sys.stderr)
44-
print("specsToTest.csv should contain CSV rows describing method taint-propagation specifications to test", file=sys.stderr)
45-
print("projectPom.xml should import dependencies sufficient to resolve the types used in specsToTest.csv", file=sys.stderr)
46+
"Usage: GenerateFlowTestCase.py specsToTest projectPom.xml outdir [--force]", file=sys.stderr)
47+
print("specsToTest should contain CSV rows or YAML models describing method taint-propagation specifications to test", file=sys.stderr)
48+
print("projectPom.xml should import dependencies sufficient to resolve the types used in specsToTest", file=sys.stderr)
49+
print("\nRun with --help for more details.", file=sys.stderr)
4650
sys.exit(1)
4751

4852
try:
@@ -85,7 +89,7 @@ def isComment(s):
8589
def readCsv(file):
8690
try:
8791
with open(file, "r") as f:
88-
specs = [l for l in f if not isComment(l)]
92+
specs = [l.strip() for l in f if not isComment(l)]
8993
except Exception as e:
9094
print("Failed to open %s: %s\n" % (file, e))
9195
sys.exit(1)

0 commit comments

Comments
 (0)