Maven plugins to analyze javascript code quality

后端 未结 10 2085
清歌不尽
清歌不尽 2020-12-24 08:00

Javascript code can be tough to maintain.
I am looking for tools that will help me ensure a reasonable quality level.
So far I have found JsUNit, a very nice unit te

10条回答
  •  遥遥无期
    2020-12-24 08:16

    I've used the following code to run JSLint as part of the COMPILE phase in Maven.

    It downloads jslint4java from maven repository so you don't need anything else.

    If JSLint found problems in javascript files, the build will fail.

    
        
            
                org.apache.maven.plugins
                maven-antrun-plugin
                1.6
                
                    
                        compile
                        
                            run
                        
                        
                            
                                
                                
                                    Ext,Utils
                                    
                                    
                                
                            
                        
                    
                
                
                    
                        com.googlecode.jslint4java
                        jslint4java-ant
                        1.4.2
                    
                
            
    

提交回复
热议问题