GithubHelp home page GithubHelp logo

sbt-checkstyle-plugin's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sbt-checkstyle-plugin's Issues

Upgrade SBT version to 1.6.x

The current SBT version is 1.1.0.
It could be better to upgrade to get all improvements to the project.

What do you think? I could provide a PR to upgrade it.

Problem with apache commons-cli

I have multi-module project. When I try to use checkstyle in any of my submodules I am getting the following error:

java.lang.NoSuchMethodError: org.apache.commons.cli.Options.hasShortOption(Ljava/lang/String;)Z

Any idea?

value CheckstyleSeverityLevel is not a member of object com.etsy.sbt.Checkstyle

I am trying to configure the fail build case,

This is my build.sbt

import com.etsy.sbt.Checkstyle.CheckstyleSeverityLevel._
com.etsy.sbt.Checkstyle.CheckstyleTasks.checkstyleSeverityLevel := Some(CheckstyleSeverityLevel.Error)

I keep on getting the following error. I am using play 2.4.x, Scala 2.11.6 and sbt version is 0.13.8

build.sbt:31: error: value CheckstyleSeverityLevel is not a member of object com.etsy.sbt.Checkstyle
import com.etsy.sbt.Checkstyle.CheckstyleSeverityLevel._
^
sbt.compiler.EvalException: Type error in expression
at sbt.compiler.Eval.checkError(Eval.scala:384)
at sbt.compiler.Eval.compileAndLoad(Eval.scala:183)
at sbt.compiler.Eval.evalCommon(Eval.scala:152)
at sbt.compiler.Eval.evalDefinitions(Eval.scala:122)
at sbt.EvaluateConfigurations$.evaluateDefinitions(EvaluateConfigurations.scala:271)
at sbt.EvaluateConfigurations$.evaluateSbtFile(EvaluateConfigurations.scala:109)
at sbt.Load$.sbt$Load$$loadSettingsFile$1(Load.scala:712)
at sbt.Load$$anonfun$sbt$Load$$memoLoadSettingsFile$1$1.apply(Load.scala:717)
at sbt.Load$$anonfun$sbt$Load$$memoLoadSettingsFile$1$1.apply(Load.scala:716)
at scala.collection.MapLike$class.getOrElse(MapLike.scala:128)
at scala.collection.AbstractMap.getOrElse(Map.scala:58)
at sbt.Load$.sbt$Load$$memoLoadSettingsFile$1(Load.scala:716)
at sbt.Load$$anonfun$loadFiles$1$2.apply(Load.scala:723)
at sbt.Load$$anonfun$loadFiles$1$2.apply(Load.scala:723)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
at scala.collection.AbstractTraversable.map(Traversable.scala:105)
at sbt.Load$.loadFiles$1(Load.scala:723)
at sbt.Load$.discoverProjects(Load.scala:734)
at sbt.Load$.discover$1(Load.scala:545)
at sbt.Load$.loadTransitive(Load.scala:574)
at sbt.Load$.loadProjects$1(Load.scala:442)
at sbt.Load$.loadUnit(Load.scala:446)
at sbt.Load$$anonfun$18$$anonfun$apply$11.apply(Load.scala:281)
at sbt.Load$$anonfun$18$$anonfun$apply$11.apply(Load.scala:281)
at sbt.BuildLoader$$anonfun$componentLoader$1$$anonfun$apply$4$$anonfun$apply$5$$anonfun$apply$6.apply(BuildLoader.scala:91)
at sbt.BuildLoader$$anonfun$componentLoader$1$$anonfun$apply$4$$anonfun$apply$5$$anonfun$apply$6.apply(BuildLoader.scala:90)
at sbt.BuildLoader.apply(BuildLoader.scala:140)
at sbt.Load$.loadAll(Load.scala:334)
at sbt.Load$.loadURI(Load.scala:289)
at sbt.Load$.load(Load.scala:285)
at sbt.Load$.load(Load.scala:276)
at sbt.Load$.apply(Load.scala:130)
at sbt.Load$.defaultLoad(Load.scala:36)
at sbt.BuiltinCommands$.doLoadProject(Main.scala:481)
at sbt.BuiltinCommands$$anonfun$loadProjectImpl$2.apply(Main.scala:475)
at sbt.BuiltinCommands$$anonfun$loadProjectImpl$2.apply(Main.scala:475)
at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:58)
at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:58)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:60)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:60)
at sbt.Command$.process(Command.scala:92)
at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:98)
at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:98)
at sbt.State$$anon$1.process(State.scala:184)
at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:98)
at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:98)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.MainLoop$.next(MainLoop.scala:98)
at sbt.MainLoop$.run(MainLoop.scala:91)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:70)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:65)
at sbt.Using.apply(Using.scala:24)
at sbt.MainLoop$.runWithNewLog(MainLoop.scala:65)
at sbt.MainLoop$.runAndClearLast(MainLoop.scala:48)
at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:32)
at sbt.MainLoop$.runLogged(MainLoop.scala:24)
at sbt.StandardMain$.runManaged(Main.scala:53)
at sbt.xMain.run(Main.scala:28)
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
at xsbt.boot.Launch$.run(Launch.scala:109)
at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
at xsbt.boot.Launch$.launch(Launch.scala:117)
at xsbt.boot.Launch$.apply(Launch.scala:18)
at xsbt.boot.Boot$.runImpl(Boot.scala:41)
at xsbt.boot.Boot$.main(Boot.scala:17)
at xsbt.boot.Boot.main(Boot.scala)
[error] sbt.compiler.EvalException: Type error in expression
[error] Use 'last' for the full log.

Checkstyle randomly exits when working on multiple projects

Hi,

I am using this plugin on my project which has quite a lot sub-projects.
So the issue is after I type sbt checkstyle, it exits sbt in random number of sub-projects, or work very well sometimes.
Working well refers to it can generate reports for all sub-projects.
It seems like this plugin randomly picks up a sub-project to work and exits SBT with unknown reasons.
Any ideas about how to fix it is really appreciated!

New Feature: support for generating a XLST formatted report

At the moment, the plugin does not support formatting of the XML report by using an XLST style sheet. Would it be possible to add this feature? (Reading the XML itself isn't as easy as reading a formatted version.) I believe that checkstyle itself includes style files that could be used.

xsltTransformations Test Fails on Travis

The scripted checkstyle/xslt test fails on Travis despite working locally. It is currently not running as part of the CI build, but this test should be fixed to pass there.

Set Up Scalastyle

Set up scalastyle for the project and run it in Travis to ensure a consistent code style.

Path configurable

I have a mulit project. One of those projects consists mainly of generated code and I don't want to run checkstyle on those files. Is there a way to specific a subdirectory to run checkstyle on instead of the entire project?

Checkstyle 3.0.0 fails with mismatching dependency

I know this is really a problem between two saxon packages but it shows up any time I try to apply an XSLT to checkstyle.

java.lang.NoSuchMethodError: net.sf.saxon.Configuration.setProcessor(Ljava/lang/Object;)V
at net.sf.saxon.s9api.Processor.(Processor.java:68)
at com.etsy.sbt.checkstyle.Checkstyle$.applyXSLT(Checkstyle.scala:106)
at com.etsy.sbt.checkstyle.Checkstyle$.checkstyle(Checkstyle.scala:56)

Add support for auto plugins

See http://www.scala-sbt.org/0.13/docs/Plugins.html for more info

Since this would be a breaking change, maybe we should also do some or all of the following:

  • Remove the deprecated configFile setting
  • Remove "checkstyle" from the start of each setting
  • Make sure parameter names match Maven plugin
  • Move XSLTSettings into Checkstyle or move everything to com.etsy.sbt.checkstyle to make importing better

Exception: net.sf.saxon.s9api.SaxonApiException: The supplied file does not appear to be a stylesheet

I am using checkstyle 7.1 version with this plugin. sbt checkstyle command run file and generate report into xml successfully. But when i am using xslt trasnforamtion from xml to html, i am getting following error:

Error at checkstyle on line 2 column 27 of checkstyle-report.xml:
  XTSE0150: The supplied file does not appear to be a stylesheet
net.sf.saxon.s9api.SaxonApiException: The supplied file does not appear to be a stylesheet
    at net.sf.saxon.s9api.XsltCompiler.compile(XsltCompiler.java:546)
    at com.etsy.sbt.checkstyle.Checkstyle$$anonfun$applyXSLT$1.apply(Checkstyle.scala:112)
    at com.etsy.sbt.checkstyle.Checkstyle$$anonfun$applyXSLT$1.apply(Checkstyle.scala:109)
    at scala.collection.immutable.Set$Set1.foreach(Set.scala:74)
    at com.etsy.sbt.checkstyle.Checkstyle$.applyXSLT(Checkstyle.scala:109)
    at com.etsy.sbt.checkstyle.Checkstyle$.checkstyle(Checkstyle.scala:56)
    at com.etsy.sbt.checkstyle.CheckstylePlugin$autoImport$$anonfun$checkstyleTask$1.apply(CheckstylePlugin.scala:35)
    at com.etsy.sbt.checkstyle.CheckstylePlugin$autoImport$$anonfun$checkstyleTask$1.apply(CheckstylePlugin.scala:34)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
-----------------------------------------------------

Can't disable the plugin when other plugins are enabled/disabled.

This causes an exception.

lazy val root = (project in file("."))
    .disablePlugins(CheckstylePlugin, plugins.JUnitXmlReportPlugin)

This too.

lazy val root = (project in file("."))
      .enablePlugins(de.johoop.cpd4sbt.CopyPasteDetector)
    .disablePlugins(CheckstylePlugin)

Either of them without the CheckstylePlugin line works.

Exception:

[error] sbt.AutoPluginException: Error determining plugins for project 'root' in D:\dev\java\test:
[error] Contradiction in selected plugins.  These plugins were both included and excluded: com.etsy.sbt.checkstyle.CheckstylePlugin

sbt 0.13.12, plugin 3.0.0

json style report

Is there a way to get a json style report instead of xml? I want to import the style check into sonarqube but it doesn't take xml. Also, what is the intended way to view the existing xml style report?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.