I started to work on adding the help text as suggested, but have got very 
confused. I'm an embedded C programmer and while Java is mostly 
understandable, I haven't found a suitable guide for contributing to 
existing plugins. I have some experience with git, but Maven is all new to 
me. Whatever I try to do I get errors that mean nothing to me like:

mvn hpi:run
[INFO] Scanning for projects...
[WARNING] The POM for org.jenkins-ci.tools:maven-hpi-plugin:jar:2.7 is 
missing, no dependency information available
[WARNING] Failed to build parent project for 
io.jenkins.plugins:warnings-ng:hpi:4.0.0-SNAPSHOT

I think I know the code change to make, but cannot build or test it. The 
addition I think is needed is as below, and I've attached the complete 
file. If this is good then it can be added...

Thanks for all the efforts of the developers, if a good webpage could walk 
though going from nothing to building and testing a plugin, that would be 
really helpful.

        @Override
        public String getHelp() {
            return "<p><p>Ensure that the output from the CodeWarrior build 
tools is in the expected format. If there are warnings present, but they 
are not found, then it is likely that the format is incorrect. The mwccarm 
compiler and mwldarm linker tools may support a configurable message style. 
This can be used to enforce the expected output format, which may be 
different from Metrowerks CodeWarrior (and thus require a different tool). 
For example the following could be appended to the build flags:</p>"
                    + "<p><code>-msgstyle gcc -nowraplines</code></p></p>";
        }

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/580f12cb-1ded-4ea8-8b90-fec5f27cbc1c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
package io.jenkins.plugins.analysis.warnings;

import java.util.Collection;

import edu.hm.hafner.analysis.IssueParser;
import edu.hm.hafner.analysis.parser.MetrowerksCwCompilerParser;
import edu.hm.hafner.analysis.parser.MetrowerksCwLinkerParser;
import edu.umd.cs.findbugs.annotations.NonNull;

import org.kohsuke.stapler.DataBoundConstructor;
import org.jenkinsci.Symbol;
import hudson.Extension;

import io.jenkins.plugins.analysis.core.model.ReportScanningToolSuite;

/**
 * Provides a parser and customized messages for the Metrowerks CodeWarrior compiler and linker.
 *
 * @author Aykut Yilmaz
 */
public class MetrowerksCodeWarrior extends ReportScanningToolSuite {
    private static final long serialVersionUID = 4315389958099766339L;
    static final String ID = "metrowerks";

    /** Creates a new instance of {@link MetrowerksCodeWarrior}. */
    @DataBoundConstructor
    public MetrowerksCodeWarrior() {
        super();
        // empty constructor required for stapler
    }

    @Override
    protected Collection<? extends IssueParser> getParsers() {
        return asList(new MetrowerksCwCompilerParser(), new MetrowerksCwLinkerParser());
    }

    /** Descriptor for this static analysis tool. */
    @Symbol("metrowerksCodeWarrior")
    @Extension
    public static class Descriptor extends ReportScanningToolDescriptor {
        /** Creates the descriptor instance. */
        public Descriptor() {
            super(ID);
        }

       	@Override
        public String getHelp() {
            return "<p><p>Ensure that the output from the CodeWarrior build tools is in the expected format. If there are warnings present, but they are not found, then it is likely that the format is incorrect. The mwccarm compiler and mwldarm linker tools may support a configurable message style. This can be used to enforce the expected output format, which may be different from Metrowerks CodeWarrior (and thus require a different tool). For example the following could be appended to the build flags:</p>"
                    + "<p><code>-msgstyle gcc -nowraplines</code></p></p>";
        }

        @NonNull
        @Override
        public String getDisplayName() {
            return Messages.Warnings_MetrowerksCodeWarrior_ParserName();
        }
    }
}

Reply via email to