Uploaded image for project: 'Clover'
  1. Clover
  2. CLOV-1187

Don't spam the console with println anytime clover grails plugin is installed

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Fixed
    • 3.1.10
    • Grails Plugin
    • None
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      From looking at the _Events.groovy hooks in the plugin, there are several println statements which will execute in all contexts, not just testing and not just when clover.on is specified. Specifically, the set classpath and compile start/end hooks will happen everytime any Grails command is run.

      This is bad practice for a plugin. The println statements should be changed to use the grailsConsole which is available automatically

      println "foo" => grailsConsole.log "foo"

      or grailsConsole.updateStatus "foo"

      Secondly, this should probably be wrapped in a helper which only prints if the the clover is enabled, ie:

      def logStuff(msg)

      { if( config.on ) grailsConsole.log msg }

      Attachments

        Activity

          People

            Unassigned Unassigned
            e23cac2bea4b Aaron Long
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: