Giter VIP home page Giter VIP logo

rules-plugin-template's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rules-plugin-template's Issues

Sensor analysis - connect timed out

Hi,

Below you could see what happen when i try to send analytics with sonar-scanner for a Progress project. I specify "Progress project" because when i send analytics with sonar-scanner for java (example), i got no error and the analysis is done whereas for a Progress project the analysis isn't done but i've a visual on the website without any rules used.

I looked at how you sonar-project.properties is set here : https://riverside-software.atlassian.net/wiki/display/OESONAR/Getting+started and i used the same thing, so what's the difference between a java project and a Progress project ?

INFO: Unable to send analytics
java.net.SocketTimeoutException: connect timed out
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
at sun.net.www.http.HttpClient.(HttpClient.java:211)
at sun.net.www.http.HttpClient.New(HttpClient.java:308)
at sun.net.www.http.HttpClient.New(HttpClient.java:326)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1202)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1138)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1032)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:966)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1316)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1291)
at org.sonar.plugins.openedge.sensor.OpenEdgeProparseSensor.execute(OpenEdgeProparseSensor.java:196)
at org.sonar.scanner.sensor.SensorWrapper.analyse(SensorWrapper.java:53)
at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:57)
at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:49)
at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:78)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:175)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:143)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:128)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:262)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:257)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:247)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:143)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:128)
at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:47)
at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:86)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:143)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:128)
at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:118)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:117)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)
at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:123)
at org.sonarsource.scanner.cli.Main.execute(Main.java:77)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)

Goal excution failed

Thanks for the information provided about my previous issue, i put the correct artifact in my project, but now, after some try, as you can see below, i've some error about finding class or package but in my eclipse/intelliJ project, all is correct.
And after checking, all the information wanted are on the project.

I don't know what to do now ...

build_plugin_lang_progress--error_2 7

Making a test rule with NoOp template and foo example

Hi,

I'm implementing a testing rule as "Foo rule" with the NoOp template but when i compile to try, i got an error due to the method reportIssue who isn't found as you can see below :

build_plugin_lang_progress--error_2 11

My code of my testing rule is below :

package com.test.rules;

import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.sensor.SensorContext;
import org.sonar.api.rule.RuleKey;
import org.sonar.check.Priority;
import org.sonar.check.Rule;
import org.sonar.plugins.openedge.api.LicenceRegistrar.Licence;
import org.sonar.plugins.openedge.api.checks.OpenEdgeProparseCheck;
import org.sonar.plugins.openedge.api.model.SqaleConstantRemediation;
import org.sonar.plugins.openedge.api.org.prorefactor.treeparser.ParseUnit;
import org.sonar.plugins.openedge.api.org.prorefactor.core.JPNode;

@Rule(priority = Priority.INFO, name = "Rule One", tags = {"test"})
@SqaleConstantRemediation(value = "5min")
public class RuleOne extends OpenEdgeProparseCheck {

  public RuleOne(RuleKey ruleKey, SensorContext context, Licence licence, String serverId) {
    super(ruleKey, context, licence, serverId);
  }

  @Override
  public void execute(InputFile file, ParseUnit o) {
    visitTree(o.getTopNode());
  }
  
  private void visitTree(JPNode node) {
    visitNode(node);
    for (JPNode child : node.getDirectChildren()) {
      visitTree(child);
    }
  }
 
  private void visitNode(JPNode node) {
    if ("message".equalsIgnoreCase(node.getText())) {
      reportIssue(node, "Message was detected");
    }
  }
}

And i've put the rule in the RulesRegistrar classe with the NoOpRule :

@SuppressWarnings("unchecked")
  public static Class<? extends OpenEdgeProparseCheck>[] ppCheckClasses() {
    return new Class[] {NoOpRule.class, RuleOne.class};
  }

I don't understand why when i just copy the test, it can't found the result similar as it : https://riverside-software.atlassian.net/wiki/display/OESONAR/Write+custom+rules

AbstractLineRule doesn't exist

I'm testing the template, all is working but i wanted to create a custom rules as shown in the section : Create your custom rule (https://riverside-software.atlassian.net/wiki/display/OESONAR/Write+custom+rules) but the file api.checks.AbstractLintRule doesn't exist anymore.

After compiling 3 times without any change (using mvn install), the compilation is good but only the "NoOpRule" appear in the dashboard, the "FooRule" doesn't appear.
rules1

EDIT : Now i tried the command mvn clean install and now the compilation is failing.

V2.0.0

I've upgraded the plugin to V2.0.0 but now the dependencies about openedge-checks-shaded 1.3.11 isn't supported.
But in the new version, openedge-checks-shaded doesn't exist.
Should i use openedge-checks 1.3.12 and so remove OpenEdgeXrefCheck and having a new problems (this error :
image)
or should i stay with the shaded version ?

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.