Skip to content

Conversation

wolfred24
Copy link

@wolfred24 wolfred24 commented Jun 7, 2025

This PR closes

#1
#3

Upgrade the wro4j version and change the Gson dependency scope. Refactor the RunnerJsHintProcessor to improve resource file handling, error handling, and logging clarity.

Changes

  • Now is possible to use the .jshintrc file functionallity to set the JShint options on any base or parent directory.
  • Greatly improved execution logging.
  • Fixed Groovy bug.
  • Updated wro4j to version 1.8

New execution logging example

[echo] WRO File: wro.xml
     [echo] Context Folder: test_code_dir
     [echo] Config File: wro.properties
     [echo] ===============================
     [java] processing group: jshint-test.css
     [java] processing group: jshint-test.js
     [java] 
     [java] ========== Processing resource: /asi.js ==========
     [java] 
     [java] [JShint] .jshintrc loaded: /Users/cesar/Documents/developement/TS7700_MI/vtd-web/tools/wro4j/test/.jshintrc
     [java] [JShint] Using .jshintrc configuration in: /Users/cesar/Documents/developement/TS7700_MI/vtd-web/tools/wro4j/test/test_code_dir
     [java] [JShint] Options: esnext=true,strict=true,undef=true,unused=true,eqeqeq=true,curly=true,browser=true,node=true,devel=true,asi=false,maxerr=50.0,latedef=true,noarg=true,nonew=true,camelcase=true,quotmark=true,trailing=true,freeze=true,futurehostile=true,nocomma=true,varstmt=true
     [java] The following resource: ro.isdc.wro.model.resource.Resource@752325ad[JS,/asi.js,true] has 6 errors.
     [java] ro.isdc.wro.extensions.processor.support.linter.LinterError@b3ca52e[
     [java]   line=0
     [java]   character=0
     [java]   reason=Bad option: 'varstmt'.
     [java]   evidence=
     [java] ]
     [java] ro.isdc.wro.extensions.processor.support.linter.LinterError@45c7e403[
     [java]   line=3
     [java]   character=3
     [java]   reason=Missing "use strict" statement.
     [java]   evidence=  var x = 1
     [java] ]
     [java] ro.isdc.wro.extensions.processor.support.linter.LinterError@2925bf5b[
     [java]   line=3
     [java]   character=12
     [java]   reason=Missing semicolon.
     [java]   evidence=  var x = 1
     [java] ]
     [java] ro.isdc.wro.extensions.processor.support.linter.LinterError@710f4dc7[
     [java]   line=4
     [java]   character=12
     [java]   reason=Missing semicolon.
     [java]   evidence=  var y = 2
     [java] ]
     [java] ro.isdc.wro.extensions.processor.support.linter.LinterError@1ff4931d[
     [java]   line=5
     [java]   character=15
     [java]   reason=Missing semicolon.
     [java]   evidence=  return x + y
     [java] ]
     [java] ro.isdc.wro.extensions.processor.support.linter.LinterError@65e98b1c[
     [java]   line=2
     [java]   character=10
     [java]   reason='semicolonTest' is defined but never used.
     [java]   evidence=function semicolonTest() {
     [java] ]
     [java] Finished processing: /asi.js

Cesar Alfredo Martinez Gallegos added 17 commits June 7, 2025 11:14
…f linter errors and enhance .jshintrc configuration output
…e injection logic, and enhance CSV options mapping
… add methods to strip comments and strings, and enhance global variable injection logic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant