Skip to content

Update README #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

knewbury01
Copy link

for example of use , I think it was maybe previously less clear that:

  • the pack provided needed to be the name,
  • that the CodeQL workspace means the workspace file (bc the file describes the workspace, ie do not provide a directory root of the actual workspace)
  • how to verify customization success condition, even though it mentions that it will get added to the standard library, for users less familiar with CodeQL, this doesnt describe what to actually check. and make it (which takes hours) then run something to verify (as opposed to check a file content) is more lengthy

@@ -63,6 +69,18 @@ This example targets the C/C++ language, but you can use this for any supported
3. Add a dependency on `codeql/cpp-all` with `codeql pack add --dir=cpp-customizations codeql/cpp-all`
4. Implement the customizations module with `mkdir -p cpp-customizations/foo/cpp_customizations && echo "import cpp" > cpp-customizations/foo/cpp_customizations/Customizations.qll`

To verify that the customization pack was correctly imported one can check that it is listed as a dependency in the standard library pack it was added to. It will look as follows (for example for a pack named `foo/cpp-customizations` added to `codeql/cpp-all`):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Was there a situation where a customization pack was not added?

Perhaps we can add more validation to determine if something looks like a customization pack, but isn't one to warn the user?

Copy link
Author

Choose a reason for hiding this comment

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

if the directory naming schema "where any character - in the scope or package_name is replaced with _"
listed in the readme is not observed , ie if the name accidentally has the - not the _ it will still create the bundle and it will contain the customization pack but will not do the import into the std lib pack (ie might look sorta correct but will not be usable)

I do know this detail is bold highlighted in the action readme, ... I still have missed it 2/2 times on my own CLI usage attempts 😅 (which is maybe a me thing, but also again, if the user is still only getting familiar with CodeQL overall, making them memorize this specific step is less ideal)

Copy link
Author

Choose a reason for hiding this comment

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

tho I would be happy to see a validation step / instead/in addition to the addition to the readme!

knewbury01 and others added 2 commits April 25, 2024 12:02
Co-authored-by: Remco Vermeulen <[email protected]>
Co-authored-by: Remco Vermeulen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants