Last active
February 12, 2019 03:02
-
-
Save sumyapp/f0654d7722e6f6144bbef81e6269cc33 to your computer and use it in GitHub Desktop.
goodcheck.yml sample for java project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rules: | |
- id: com.companyname.java.instanceof | |
pattern: instanceof | |
message: instanseofを使わなくて済むように設計しましょう。instanceofについての詳細は https://www.slideshare.net/HiroshiSaito1/deep-dive-into-instanceof を見てください | |
glob: | |
- "**/*.java" | |
fail: | |
- if("Hello, world!" instanceof String){} | |
pass: | |
- if("Hello, world".getClass().getCanonicalName() == "java.lang.String"){} | |
- id: com.companyname.incident.20180101 | |
pattern: "@Transactional" | |
message: トランザクションを使う際は十分に注意してください。トランザクションに関連して起きた障害のレポートは下記から閲覧出来ます。 https://developer.smartnews.com/blog/2018/07/incident_review/ | |
glob: | |
- "**/*.java" | |
fail: | |
- "@Transactional" | |
pass: | |
- "Hello, world" | |
- id: com.companyname.companyname | |
pattern: | |
- Companyname | |
- "Compane name" | |
message: CompanyNameが正しい社名・サービス名です。 | |
glob: | |
- "**/*.java" | |
- "**/*.xml" | |
- "**/*.yml" | |
- "**/*.jsp" | |
- "**/*.js" | |
fail: | |
- "Comapney name" | |
- "Companyname" | |
pass: | |
- "CompanyName" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment