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

feat: Set up custom lint #27

Merged
merged 4 commits into from
Jul 29, 2024
Merged

feat: Set up custom lint #27

merged 4 commits into from
Jul 29, 2024

Conversation

naipaka
Copy link
Contributor

@naipaka naipaka commented Jul 28, 2024

🔗 Related Issues

  • None

🙌 What's Done

  • Set up custom lint
  • Add avoid_hardcoded_japanese rule
  • Add code check workflow
  • Add pubspec.lock to .gitignore

✍️ What's Not Done

  • None

🖼️ Image Differences

CleanShot 2024-07-29 at 08 16 10

🤼 Desired Review Method

  • Correction Commit
  • Pair programming

Note

It is possible that a reviewer's will may cause a method to be implemented that is not selected.

📝 Additional Notes

Pre-launch Checklist

  • I have reviewed my own code.
  • I have added tests that prove my fix is effective or that my feature works.
  • I updated/added relevant documentation (doc comments with ///).

@naipaka naipaka requested a review from a team as a code owner July 28, 2024 23:16
@naipaka naipaka requested review from boywithdv and removed request for a team July 28, 2024 23:16
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 have added a workflow to run tests for analyze and custom_lint using GitHub Actions.

Comment on lines +9 to +10
# Unnecessary if not localizing or not using Japanese.
# - avoid_hardcoded_japanese: false
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 have provided an example of rule exclusion.

Comment on lines +9 to +10
List<LintRule> getLintRules(CustomLintConfigs configs) => [
const AvoidHardcodedJapanese(),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As an example, I have defined custom lint rules that have already been implemented in another repository.

@naipaka naipaka requested a review from riscait July 28, 2024 23:21
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since the test does not start from the main function, the test code is placed in the lint_test directory instead of the test directory. I referred to other repositories that use custom_lint.

Copy link
Member

@riscait riscait left a comment

Choose a reason for hiding this comment

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

LGTM
Thanks for adding Custom lint!

@naipaka naipaka merged commit f695826 into main Jul 29, 2024
2 checks passed
@naipaka naipaka deleted the add-avoid-hardcoded-japanese-rule branch July 29, 2024 03:04
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