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

CMake formatter gersemi can't format all files #621

Open
ChrisCummins opened this issue Mar 10, 2022 · 2 comments
Open

CMake formatter gersemi can't format all files #621

ChrisCummins opened this issue Mar 10, 2022 · 2 comments
Labels
Bug Something isn't working Testing & Tooling Tests, tooling, and build systems

Comments

@ChrisCummins
Copy link
Contributor

🐛 Bug

Some files yield error:

AST mismatch after formatting

To Reproduce

Steps to reproduce the behavior:

pre-commit run --all-files
@ChrisCummins ChrisCummins added Bug Something isn't working Testing & Tooling Tests, tooling, and build systems labels Mar 10, 2022
ChrisCummins added a commit to ChrisCummins/CompilerGym that referenced this issue Mar 10, 2022
@BlankSpruce
Copy link

I'm the author of gersemi. This particular issue is fixed with 0.8.0 so consider upgrading pre-commit hook.

Another thing is that you should consider putting .gersemirc file in the root of the project to enable smart formatting of non-native CMake commands. If I'm correct for this project it would be this minimal configuration:

definitions:
- build_tools/cmake/

@ChrisCummins
Copy link
Contributor Author

Hi @BlankSpruce, thanks for letting me know about the update and for the usage tip! I was going to file an issue for you with a minimal repro, but looks like you beat me to it 🙂

Cheers,
Chris

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Testing & Tooling Tests, tooling, and build systems
Projects
None yet
Development

No branches or pull requests

2 participants