Kengo's blog

Technical articles about original projects, JVM, Static Analysis and TypeScript.

PMD

ruleset-for-SLF4J version 0.4 has been released

I fixed some NPE in version 0.3. eller86/ruleset-for-SLF4J · GitHub But I found that parsing code is not enough to detect bugs. For example, we cannot know the difference between: // this is OK, both of placeholder and parameter is only on…

ruleset-for-SLF4J version 0.2 has been released

New version of ruleset-for-SLF4J has been released! Now it helps you to check number of placeholder. https://github.com/eller86/ruleset-for-SLF4J There are few limitations to use. Please read document for detail.

Maven使いのためのPMD入門(2012年夏)

PMDは「枯れた技術」だと思うしネット上にも日本語情報は多いですが、わりと古いものが多い気がするし1箇所にまとまってたほうが便利だと思うのでまとめてみます。 なお著者のスペックの都合上、SBTのようなナウでヤングなビルドツールは対象にしていません…

SLF4JのポカミスをPMDで自動検出する

※本記事は昨日世に出た個人プロダクトruleset-for-SLF4Jの宣伝と解説です。 SLF4Jをお使いの方はで有用でコントロールしやすいログを出すための工夫の一貫として、Logger生成時に生成元クラスを渡しているはずです。 private final Logger logger = LoggerFa…

ruleset-for-SLF4J is now on Maven central!

I am excited to announce the ruleset-for-SLF4J is now on Maven central! Many thanks for sonatype!So, you can use it easily with Maven like: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-pmd-plugin</artifactId> <version>2.7.1</version> <dependencies> <dependency> <groupId>jp.…</groupid></dependency></dependencies></plugin>

memo: How to generate code automatically for Java project

There are many way to generate code automatically. I think that the most common way is Annotation Processing Tool and Pluggable Annotation Processing API, but always I use PMD or ASM because I'm familiar with these libraries. Annotation Pr…

Ruleset for SLF4J has been updated

Today I updated ruleset for SLF4J. There is no enhancement but many fixing. ruleset for SLF4Jを更新しました。バグ修正が主な変更となっています。 Comparing 3fefc4f29b...a9dd209 · eller86/ruleset-for-SLF4J · GitHub The biggest fix is avoiding…

PMD ruleset for SLF4J

I wanted to use ruleset to validate my codes so I asked to ML of SLF4J, but there is no tool to help. So I've created a PMD ruleset for SLF4J. It may help to code with unified valid logging. コードを統一するためのルールセットがほしくてSLF4…