Skip to content

Sort lists in cmake files in pre-commit#1084

Merged
Hardcode84 merged 2 commits intoiree-org:mainfrom
Hardcode84:cmake-pre-commit
Mar 21, 2026
Merged

Sort lists in cmake files in pre-commit#1084
Hardcode84 merged 2 commits intoiree-org:mainfrom
Hardcode84:cmake-pre-commit

Conversation

@Hardcode84
Copy link
Contributor

They were hurting my aesthetic feelings for way too long.

Copy link
Member

@kuhar kuhar left a comment

Choose a reason for hiding this comment

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

Can you land the cleanup separately from the pre-commit hook?

@Hardcode84
Copy link
Contributor Author

I can but whats the point? (Also it's wave repo, I haven't tried on iree or llvm yet)

@kuhar
Copy link
Member

kuhar commented Mar 9, 2026

I can but whats the point?

Easier to revert if the hook goes rouge.

(Also it's wave repo, I haven't tried on iree or llvm yet)

🤦 I missed this part

Comment on lines +35 to +40
# Sort file and library lists in CMake files.
- repo: https://github.com/Hardcode84/3
rev: v0.1.0
hooks:
- id: sort-cmake-lists
exclude: llvm-project/
Copy link
Contributor

@tgymnich tgymnich Mar 9, 2026

Choose a reason for hiding this comment

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

Can we have this script live locally under .pre-commit instead?

repos:
  - repo: local
    hooks:
      - id: sort-cmake-lists
        name: Sort CMake lists
        entry: .pre-commit/sort-cmake-lists.py
        language: python
        exclude: llvm-project/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will think about it and I'm not in particular haste, lets merge the cmake changes then

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now, I think I'll keep it as a external dep, as I'm planning to use it in multiple projects.

Copy link
Contributor

@ftynse ftynse left a comment

Choose a reason for hiding this comment

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

LGTM. Looks like useful hook elsewhere, but perhaps with a better repo name.

Hardcode84 added a commit that referenced this pull request Mar 10, 2026
Automated sort via sort-cmake-lists pre-commit hook from
#1084

Signed-off-by: Ivan Butygin <ivan.butygin@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@Hardcode84
Copy link
Contributor Author

repo name is perfect, I have no intention to change it

@Hardcode84 Hardcode84 force-pushed the cmake-pre-commit branch 2 times, most recently from e214fe2 to 0dd26dc Compare March 19, 2026 09:15
Hardcode84 and others added 2 commits March 21, 2026 00:53
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Ivan Butygin <ivan.butygin@gmail.com>
Signed-off-by: Ivan Butygin <ivan.butygin@gmail.com>
@Hardcode84 Hardcode84 merged commit 226700f into iree-org:main Mar 21, 2026
19 checks passed
@Hardcode84 Hardcode84 deleted the cmake-pre-commit branch March 21, 2026 00:39
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.

4 participants