Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Add code style checks #331

Merged
merged 6 commits into from
Nov 23, 2023
Merged

Add code style checks #331

merged 6 commits into from
Nov 23, 2023

Conversation

timonegk
Copy link
Member

@timonegk timonegk commented Jul 7, 2023

Proposed changes

  • Add black and ruff for Python
  • Add clang-format for C++
  • Add pre-commit configuration and workflow that checks both

@jaagut

This comment was marked as outdated.

@jaagut

This comment was marked as resolved.

@jaagut
Copy link
Member

jaagut commented Aug 11, 2023

This functionally, this should be ready. However, we already have a merge conflict and presumably many more will occur, with #334

@Flova
Copy link
Member

Flova commented Aug 12, 2023

As the formatting of all these files is automated (i think) we should just accept all incoming changes and rerun the formatting.

by usage of the [pre-commit](https://pre-commit.com/) framework.
We are including the following:
- `ruff` for fast python linting
- `black` for opinionated python auto formatting
- `clang-format` for C++ formatting based on google styles
- `cppcheck` for C++ linting
that will run and check the pre-commit hooks on PRs and updates on the
master branch
@texhnolyze texhnolyze marked this pull request as ready for review November 22, 2023 23:46
@texhnolyze
Copy link
Contributor

I've taken this over cleaned up the history to only have two commits for pre-commit and ci setup, then got the latest changes from master and then autoformatted everything again.

@jaagut jaagut merged commit 593ad95 into master Nov 23, 2023
1 check passed
@jaagut jaagut deleted the code_style branch November 23, 2023 13:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Status: In progress
Development

Successfully merging this pull request may close these issues.

4 participants