jscs-dev/grunt-jscs

Use of "force" option should not disable reporter

marob opened this issue · 5 comments

marob commented

If the "force" option is enabled (true), the reporter is disabled: no detail of jscs violations are written in the console/file.

My use case is to generate a jscs report (in checkstyle or junit format) in continuous integration but not to fail the build. If I set "force" to true, my report is (nearly) empty and do not list jscs violations. If I set "force" to false, my report is complete, but the build fails.

Did the jscs fix all the errors? Or there some errors left, but they are not outputted?

marob commented

Nothing has been fixed as I have not set the boolean "fix" to true.

I'm trying to clarify this bit -

If the "force" option is enabled (true), the reporter is disabled: no detail of jscs violations are written in the console/file.

marob commented

Launching with "force: false" outputs some jscs violations (count of violations + detail of violations) in the console.
If we launch again with "force: true", the console output still has jscs violation count, but without details.

The problem is, if you use some reporterOutput (say Checkstyle or Junit), the content of the file is:

  • empty with "force: true"
  • filled with jscs violations with "force: false"

So the build can either not fail, either output the jscs violations in a file. But it can't do both.

We probably not gonna fix this at this point