Skip to content

fix: linter configs to root folder #44

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

Merged
merged 7 commits into from
Jun 17, 2025
Merged

Conversation

westonplatter
Copy link
Member

@westonplatter westonplatter commented Jun 13, 2025

what

  • move linter configs from .trunk/configs to the root folder based on this conversation.

  • confirmed the linters pull configs from the root folder

    • checkov
    • markdown
    • tflint
    • yaml

Summary by CodeRabbit

  • Chores
    • Added a local settings configuration file for Claude with specified command permissions.
    • Updated the ignore rules to exclude the .claude/ directory from version control.
    • Simplified the configuration of the tflint linter by removing a custom environment variable override.

westonplatter and others added 3 commits June 13, 2025 13:02
Move .tflint.hcl from .trunk/configs/ to root directory and update
trunk.yaml to use default config discovery. This simplifies the
configuration and follows standard tflint conventions.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Move .checkov.yaml, .yamllint.yaml, and .markdownlint.yaml from
.trunk/configs/ to root directory. This consolidates all important
configs at the top level for better visibility and independence
from trunk tooling.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@westonplatter westonplatter requested a review from a team as a code owner June 13, 2025 19:13
@westonplatter westonplatter changed the title Feat/move tflint to root folder fix: linter configs to root folder Jun 13, 2025
Copy link

coderabbitai bot commented Jun 13, 2025

Walkthrough

This change introduces a new .claude/settings.local.json file, which defines command permission rules for Claude, specifying allowed Bash commands and not listing any denied commands. The .trunk/.gitignore file is updated to ignore all files and subdirectories within the .claude/ directory. Additionally, the tflint linter configuration in .trunk/trunk.yaml is simplified by removing the override that set the TFLINT_CONFIG_FILE environment variable, allowing tflint to use its default configuration behavior.

Possibly related PRs

  • feat(INT-83): dial in configs for tflint #39: Modifies the same TFLINT_CONFIG_FILE environment variable setting for the tflint linter in trunk.yaml, but in the opposite direction by adding the configuration that this PR removes.

Suggested reviewers

  • gberenice
✨ Finishing Touches
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Commit Unit Tests in branch feat/move-tflint-to-root-folder
  • Post Copyable Unit Tests in Comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.trunk/.gitignore (1)

11-11: Simplify the ignore pattern
Instead of .claude/*, you can ignore the entire directory with a single pattern:

.claude/

This covers the folder and all its contents in one rule.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 60c58f4 and 019756e.

📒 Files selected for processing (3)
  • .claude/settings.local.json (1 hunks)
  • .trunk/.gitignore (1 hunks)
  • .trunk/trunk.yaml (0 hunks)
💤 Files with no reviewable changes (1)
  • .trunk/trunk.yaml
🔇 Additional comments (1)
.claude/settings.local.json (1)

1-9: Verify the allowed commands list
The allow array locks Bash execution to specific patterns (trunk check, Git moves/adds, etc.). Confirm whether other typical workflows—such as trunk lint, trunk fmt, or CI scripts—need to be permitted or are intentionally excluded.

Comment on lines 1 to 12
{
"permissions": {
"allow": [
"Bash(trunk check:*)",
"Bash(git checkout:*)",
"Bash(find:*)",
"Bash(git mv:*)",
"Bash(git add:*)"
],
"deny": []
}
}
Copy link
Member

Choose a reason for hiding this comment

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

I'm thinking that we don't want to check these in... Each developer should have their own discrepancy around which commands they feel comfortable being always allowed. What do you think? cc @oycyc

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, agree. I committed and then realized is highly specific to each dev. Added it after to fact to gitignore but didn't remove it from the repo.

Copy link
Member

@Gowiem Gowiem left a comment

Choose a reason for hiding this comment

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

This looks good -- one request around the settings.local.json calude file.

Also, please confirm that Trunk will pick up the root config files for checkov and similar when it's not explicitly told that they are in root and not in the trunk configs folder.

@westonplatter
Copy link
Member Author

westonplatter commented Jun 13, 2025

@Gowiem

This looks good -- one request around the settings.local.json calude file.

Fixed that.

Also, please confirm that Trunk will pick up the root config files for checkov and similar when it's not explicitly told that they are in root and not in the trunk configs folder.

Yes, confirmed each of the linters picks up its respective config file from the root folder.

@westonplatter westonplatter requested a review from Gowiem June 13, 2025 19:27
westonplatter added a commit to masterpointio/taskit that referenced this pull request Jun 13, 2025
westonplatter added a commit to masterpointio/taskit that referenced this pull request Jun 13, 2025
## what
- sync linter configs from template repo when
- See this for more context
masterpointio/terraform-module-template#44

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Chores**
- Updated the default set of modules to target only one specific module.
- Expanded the list of configuration files included in synchronization
tasks.
- Improved comments and ignore patterns for project-specific
directories.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Copy link
Member

@gberenice gberenice left a comment

Choose a reason for hiding this comment

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

LGTM

@gberenice gberenice merged commit 7aacf9f into main Jun 17, 2025
5 checks passed
@gberenice gberenice deleted the feat/move-tflint-to-root-folder branch June 17, 2025 15:00
gberenice pushed a commit that referenced this pull request Jun 17, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.8.0](v0.7.1...v0.8.0)
(2025-06-17)


### Features

* **INT-83:** dial in configs for tflint
([#39](#39))
([60c58f4](60c58f4))


### Bug Fixes

* **gha-trunk-upgrade:** wait for checks and merge with admin
([#42](#42))
([0c399bc](0c399bc))
* **gha:** use app–generated token to create release-please PRs
([#45](#45))
([a0c0d46](a0c0d46))
* linter configs to root folder
([#44](#44))
([7aacf9f](7aacf9f))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: masterpointbot[bot] <177651640+masterpointbot[bot]@users.noreply.github.com>
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.

3 participants