質問

I have written an API and defined a method which a user needs to call on a certain condition. Suppose a user is creating a video app then he should implement mute function in his code (which is defined in a javascript API or file). Now I am looking for a code analyzer by which i can check wether he has implemented this (in his JS file) in a correct way. According to me I think this will be a custom rule and I want to make this project in Java, so that I can take the source code( Which is a js file or html file) and do this analysis on that source code.

So is there any code analyzer tool available ?

how can i compile this idea?

And what are the possible way?

Many many thanks to all.

役に立ちましたか?

解決

You should check out CheckStyle. It will fit your needs. It was a lot of out of the box tasks like:

<module name="VisibilityModifier">
    <property name="packageAllowed" value="true"/>
</module>

But you can extend it.

You write your custom rules in Java, but it check anything. In our project, we use it e.g. to check the vadility of xml, jsp, ... files.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top