Skip to content

Conversation

@GeekMasher
Copy link
Contributor

No description provided.

@GeekMasher GeekMasher added documentation Improvements or additions to documentation enhancement New feature or request labels Aug 2, 2022
@GeekMasher GeekMasher requested a review from securingdev August 2, 2022 17:33
@GeekMasher GeekMasher self-assigned this Aug 2, 2022
@GeekMasher GeekMasher requested review from zbazztian and removed request for securingdev August 3, 2022 07:40
@zbazztian
Copy link
Contributor

zbazztian commented Aug 3, 2022

Looks good to me. I left a few comments.

Another note (which doesn't necessarily relate to this PR): Supplying multiple languages via --language is currently broken:

> ./gh-codeql-summarize -p zbazztian/commons-io-public -l java,csharp -o results

...

2022-08-03 15:26:28,120 - codeqlsummarize.generator - INFO - Finding query name: SinkModel
2022-08-03 15:26:28,120 - codeqlsummarize.generator - INFO - Running Query :: codeql/csharp-queries:utils/model-generator/CaptureSinkModels.ql
Running query "codeql/csharp-queries:utils/model-generator/CaptureSinkModels.ql"...
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/sebastian/dev/src/gh-codeql-summarize/codeqlsummarize/__main__.py", line 209, in <module>
    main(arguments)
  File "/home/sebastian/dev/src/gh-codeql-summarize/codeqlsummarize/__main__.py", line 193, in main
    database.summaries[name] = generator.runQuery(query_path)
  File "/home/sebastian/dev/src/gh-codeql-summarize/codeqlsummarize/generator.py", line 74, in runQuery
    self.codeql(
  File "/home/sebastian/dev/src/gh-codeql-summarize/codeqlsummarize/utils.py", line 152, in __call__
    raise CalledProcessError(cmd=commandstr, returncode=ret)
subprocess.CalledProcessError: Command '/home/sebastian/.local/share/gh/extensions/gh-codeql/dist/release/v2.9.4/codeql database run-queries --threads 0 /tmp/codeqlsummarize/zbazztian_commons-io-public/java codeql/csharp-queries:utils/model-generator/CaptureSinkModels.ql' returned non-zero exit status 2.

Do we really want to allow supplying multiple languages? I'd say most callers know for which languages they want the customizations, which would make the implementation much easier for us. Also, I retract my suggestion of making --language optional. I guess most of the time one would point this tool to a repository which would definitely require specifying the language one wants the summaries for anyway.

@zbazztian zbazztian mentioned this pull request Aug 3, 2022
Copy link
Contributor

@zbazztian zbazztian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@zbazztian zbazztian merged commit 52dd04b into main Aug 3, 2022
@GeekMasher GeekMasher deleted the geekmasher/better-logging2 branch August 3, 2022 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants