Skip to content
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

Use cpp as CodeQL Language #469

Closed
2 tasks done
ArielSAdamsNASA opened this issue Apr 25, 2022 · 5 comments · Fixed by #580
Closed
2 tasks done

Use cpp as CodeQL Language #469

ArielSAdamsNASA opened this issue Apr 25, 2022 · 5 comments · Fixed by #580

Comments

@ArielSAdamsNASA
Copy link
Contributor

Checklist (Please check before submitting)

  • I reviewed the Contributing Guide.
  • I performed a cursory search to see if the bug report is relevant, not redundant, nor in conflict with other tickets.

Describe the bug
The codeql-reusable.yml workflow uses C as the language, which is not a valid option. It should be cpp instead.

Expected behavior
Use cpp as the CodeQL language.

Code snips

      - name: Initialize CodeQL
        uses: github/codeql-action/init@v1
        with:
          languages: c
          config-file: nasa/cFS/.github/codeql/codeql-${{matrix.scan-type}}.yml@main

Reporter Info
Ariel Adams, ASRC Federal

@thnkslprpt
Copy link
Contributor

@ArielSAdamsNASA - Would it be better to change it to "cpp" or just remove the "languages" parameter entirely and let CodeQL auto-detect?

@ArielSAdamsNASA
Copy link
Contributor Author

@thnkslprpt I would prefer to use cpp. That way we don't have to check the workflow several times to ensure the correct language is used across multiple repos. If we let CodeQL auto-detect, we would get a note that goes something like this: "We have attempted to detect the languages in your repository. Please check the language matrix defined below to confirm you have the correct set of supported CodeQL languages." If you have additional questions about CodeQL specifically, you may ask the developers at github/codeql-action.

@thnkslprpt
Copy link
Contributor

@thnkslprpt I would prefer to use cpp...
Ah OK I get you. Yeah I thought it was strange that CodeQL supports all C standards, but doesn't allow it as a language option to be input for that parameter.
Is this is all that needs to be changed?: main...thnkslprpt:cFS:patch-1

@ArielSAdamsNASA
Copy link
Contributor Author

@thnkslprpt Looks good! All that needs to be done is to create a pull request. Here is more information on how to create PRs in our Contributing Guide if needed.

@thnkslprpt
Copy link
Contributor

@ArielSAdamsNASA OK no worries. Just wanted to check before I created the pull request.

dzbaker added a commit that referenced this issue Oct 3, 2022
Fix #469, Addresses invalid CodeQL language option
@dzbaker dzbaker closed this as completed in d4c920e Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants