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

chore: exclude srtool and node_modules for taplo #811

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Conversation

Ad96el
Copy link
Member

@Ad96el Ad96el commented Nov 26, 2024

No description provided.

@Ad96el Ad96el requested a review from ntn-x2 November 26, 2024 16:45
@Ad96el Ad96el changed the title chore: exclude srtool and node_modules chore: exclude srtool and node_modules for taplo Nov 26, 2024
Copy link
Member

@ntn-x2 ntn-x2 left a comment

Choose a reason for hiding this comment

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

What's the issue here? I've never had any problems with this configuration in my PRs.

@Ad96el
Copy link
Member Author

Ad96el commented Nov 27, 2024

It's not an issue in PRs. I use taplo in my terminal, and it can sometimes be annoying when I want to perform an operation, and it acts on all possible toml files. But we can also drop the changes and I overwrite the configs only locally on my setup.

@ntn-x2
Copy link
Member

ntn-x2 commented Nov 27, 2024

Yes but if your CLI also formats those documents, shouldn't it show up as an error in the CI as well when we run the checks? Could it be your local CLI binary does not use the same config? I have nothing against this PR, but I'd just like to understand more, since I don't have the issue. But I use the formatOnSave setting of VSCode, so I never have to run the binary myself.

@Ad96el
Copy link
Member Author

Ad96el commented Feb 19, 2025

The Taplo CLI uses the Taplo configuration from the repository. I am also using the CLI to check the formatting of the files. However, this causes Taplo to check TOML files in the node_modules, target, and target-analyze directories, which are not created in the CI. This is a bit annoying for local tests.

@Ad96el Ad96el requested a review from abdulmth February 19, 2025 08:25
@ntn-x2
Copy link
Member

ntn-x2 commented Feb 19, 2025

You can specify a path to the config file when running it from your terminal, and in the config file you can add more files to the ignore list, so they won't be checked.

@Ad96el
Copy link
Member Author

Ad96el commented Feb 19, 2025

Excluding these files is what the PR currently does. The other TOML files are important and should be checked, but I could also specify the files manually in the CLI for local checks—it’s just annoying. I prefer running a single taplo check instead of multiple taplo check PATHS commands for the TOML files I might have touched during development.

Currently, TOML files from target and target-analyze are already excluded, and excluding TOML files from auto-generated code shouldn’t be an issue.

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.

2 participants