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 compile_commands.json with clang-tidy #1183

Merged

Conversation

lmoureaux
Copy link
Contributor

Otherwise it can't find headers. Also reduce the number of steps using features
of clang-tidy-review.

Hopefully this works...

@lmoureaux lmoureaux added bug Something isn't working tools Issues related to mp, ruledit, etc along with CI and build tools. labels Aug 1, 2022
@lmoureaux lmoureaux requested a review from psampathkumar August 1, 2022 23:09
@psampathkumar
Copy link
Contributor

Set base dir is probably not needed. I added that to try and use the artifacts from Ubuntu build..but doesn't work that way.

@lmoureaux
Copy link
Contributor Author

Yeah I removed it, but I added build_dir to match what we do elsewhere. I'm not even sure if we support in-source builds 😅

@psampathkumar
Copy link
Contributor

Uh oh. You broke it 😛
And i meant

      - name: Set base_dir
        run: echo "base_dir=$(pwd)" >> $GITHUB_ENV

These aren't needed either.

@psampathkumar
Copy link
Contributor

A nice improvement would be if we can cache clang-tools. Then this would a fast check!

@psampathkumar
Copy link
Contributor

Can you bump version to 0.9.0 ? I think that fixes it.

Otherwise it can't find headers. Also reduce the number of steps using features
of clang-tidy-review.
@lmoureaux lmoureaux force-pushed the bugfix/clang-tidy-compilation-database branch from d99af15 to e64cf4b Compare August 2, 2022 12:31
@psampathkumar
Copy link
Contributor

psampathkumar commented Aug 2, 2022

Still fails :/
psampathkumar#6

@lmoureaux
Copy link
Contributor Author

lmoureaux commented Aug 2, 2022

clang-tidy failed with return code 1 and error:
Error while trying to load a compilation database:
Could not auto-detect compilation database from directory "build"
No compilation database found in /github/workspace/build or any parent directory
fixed-compilation-database: Error while opening fixed database: No such file or directory
json-compilation-database: Error while opening JSON database: No such file or directory
Running without flags.

then integration bug:

{"message":"Resource not accessible by integration","documentation_url":"https://docs.github.com/rest/reference/pulls#create-a-review-for-a-pull-request"}
Traceback (most recent call last):
  File "/review.py", line 849, in <module>
    main(
  File "/review.py", line 709, in main
    pull_request.post_review(trimmed_review)
  File "/review.py", line 116, in post_review
    post_review_response.raise_for_status()
  File "/usr/local/lib/python3.8/dist-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://api.github.com/repos/pranavtifr/freeciv21/pulls/6/reviews

@psampathkumar
Copy link
Contributor

psampathkumar commented Aug 2, 2022

Ya, I'm just looking at the integration bug.
The integration bug wasnt there yesterday :/

Clang-tidy Idk 🙈

@lmoureaux
Copy link
Contributor Author

Let's merge this so we get a green check mark at least?

@lmoureaux lmoureaux merged commit 107f711 into longturn:master Aug 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tools Issues related to mp, ruledit, etc along with CI and build tools.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants