[RFF] SonarLint for Eclipse 2.0

閲覧: 1,677 回
最初の未読メッセージにスキップ

Julien HENRY

未読、
2016/03/17 7:47:072016/03/17
To: SonarLint
Hi guys,

I'm very please to start the feedback period for SonarLint Eclipse 2.0.

The main feature is of course the connected experience. 

Update site:

Release notes:

We are especially interested by feedback regarding:
  * connectivity: authentication, proxy
  * usability: are all wordings clear, menus easy to find, wizards easy to use?
  * performance: compared to "standalone" mode with no relation with SonarQube

In case of error don't forget to provide all details (look at SonarLint console in debug mode, and also in Eclipse "Error log" view).

Known limitations:
  * Minimal supported SonarQube version is 5.2.
  * There is currently no issue tracking: it means there is no matching between issues reported by SonarLint and remote issues on SonarQube server. As a result issues flagged as false positive/won't fix are not muted in SonarLint. This will come in another version.

More details:

Typical use case:
  1) Configure a new server: either from "SonarQube server" view or use File -> New -> Others... -> SonarLint -> New Server

Images intégrées 1
  
2) After adding the server an update process should start and get all required data from server
Images intégrées 2

3) Bind your Eclipse projects with their remote project/module on the configured server. Select one or more projects -> SonarLint -> Bind with remote SonarQube server...
The wizard allow to manually search for the matching remote project (by name or key) and also provide an "auto bind" feature that tries to find best match based on Eclipse project name.
Images intégrées 3

4) That's it! Now your code is analyzed by SonarLint using rules / quality profiles configured on the SonarQube server.

5) If there is a change on server side (update analyzer, change quality profile, ...), you have to manually trigger an update for SonarLint to "see" it:
Images intégrées 4

Enjoy!

steve.price

未読、
2016/03/17 8:16:042016/03/17
To: SonarLint
Hi,

Firstly, thanks for getting this out to us.  I have installed the snapshot, but am getting an exception analysing any file:

Error during analysis
java.lang.NoClassDefFoundError: org/apache/log4j/Logger
at org.sonar.java.symexec.SymbolicEvaluator.<clinit>(SymbolicEvaluator.java:75)
at org.sonar.java.checks.UselessConditionCheck.visitNode(UselessConditionCheck.java:59)
at org.sonar.java.ast.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:89)
at org.sonar.java.ast.visitors.SubscriptionVisitor.visitChildren(SubscriptionVisitor.java:115)
at org.sonar.java.ast.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:91)
at org.sonar.java.ast.visitors.SubscriptionVisitor.visitChildren(SubscriptionVisitor.java:115)
at org.sonar.java.ast.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:91)
at org.sonar.java.ast.visitors.SubscriptionVisitor.scanTree(SubscriptionVisitor.java:72)
at org.sonar.java.ast.visitors.SubscriptionVisitor.scanFile(SubscriptionVisitor.java:65)
at org.sonar.java.checks.SubscriptionBaseVisitor.scanFile(SubscriptionBaseVisitor.java:33)
at org.sonar.java.model.InternalVisitorsBridge.visitFile(InternalVisitorsBridge.java:111)
at org.sonar.java.ast.JavaAstScanner.simpleScan(JavaAstScanner.java:97)
at org.sonar.java.ast.JavaAstScanner.scan(JavaAstScanner.java:77)
at org.sonar.java.JavaSquid.scanSources(JavaSquid.java:130)
at org.sonar.java.JavaSquid.scan(JavaSquid.java:123)
at org.sonar.plugins.java.JavaSquidSensor.analyse(JavaSquidSensor.java:90)
at org.sonarsource.sonarlint.core.analyzer.sensor.SensorsExecutor.executeSensor(SensorsExecutor.java:54)
at org.sonarsource.sonarlint.core.analyzer.sensor.SensorsExecutor.execute(SensorsExecutor.java:47)
at org.sonarsource.sonarlint.core.analyzer.sensor.PhaseExecutor.execute(PhaseExecutor.java:45)
at org.sonarsource.sonarlint.core.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:134)
at org.sonarsource.sonarlint.core.container.ComponentContainer.startComponents(ComponentContainer.java:129)
at org.sonarsource.sonarlint.core.container.ComponentContainer.execute(ComponentContainer.java:114)
at org.sonarsource.sonarlint.core.container.storage.StorageGlobalContainer.analyze(StorageGlobalContainer.java:116)
at org.sonarsource.sonarlint.core.SonarLintEngineImpl.analyze(SonarLintEngineImpl.java:132)
at org.sonarlint.eclipse.core.internal.server.Server.startAnalysis(Server.java:164)
at org.sonarlint.eclipse.core.internal.jobs.AnalyzeProjectJob$1.run(AnalyzeProjectJob.java:373)
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger
at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:39)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)
... 26 more

I can provide more information if required.

Thanks

Steve

Dinesh Bolkensteyn

未読、
2016/03/17 8:35:232016/03/17
To: SonarLint
I can't find how to add a SonarQube server - I end up on this window, which seems to be a dead-end

"File -> New -> Others... -> SonarLint -> New Server" is pretty much impossible to find without reading the doc IMO

Inline image 1

Trustpay Global Limited is an authorised Electronic Money Institution regulated by the Financial Conduct Authority registration number 900043. Company No 07427913 Registered in England and Wales with registered address 130 Wood Street, London, EC2V 6DL, United Kingdom.

For further details please visit our website at www.trustpayglobal.com.

The information in this email and any attachments are confidential and remain the property of Trustpay Global Ltd unless agreed by contract. It is intended solely for the person to whom or the entity to which it is addressed. If you are not the intended recipient you may not use, disclose, copy, distribute, print or rely on the content of this email or its attachments. If this email has been received by you in error please advise the sender and delete the email from your system. Trustpay Global Ltd does not accept any liability for any personal view expressed in this message.

--
You received this message because you are subscribed to the Google Groups "SonarLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/94b53460-cfb5-41b7-a3b7-966851202e39%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Dinesh Bolkensteyn

未読、
2016/03/17 8:47:482016/03/17
To: SonarLint
The binding doesn't seem to work on Windows for Maven projects: It tries to save a file containing the illegal ':' character in its name which fails

Inline image 1

Julien HENRY

未読、
2016/03/17 9:05:482016/03/17
To: Dinesh Bolkensteyn、SonarLint

2016-03-17 13:35 GMT+01:00 Dinesh Bolkensteyn <dinesh.bo...@sonarsource.com>:
I can't find how to add a SonarQube server - I end up on this window, which seems to be a dead-end

The fact that a default "Localhost" server is configured is a mistake. I'll remove it.

Entry point to configure server is the "SonarQube Servers" view ( Window -> Show view). This is similar to the management of Web servers with JST.

In case you have no server configured (after I remove the default Localhost), you should see in binding wizard:
Images intégrées 1

Julien HENRY

未読、
2016/03/17 9:06:242016/03/17
To: Dinesh Bolkensteyn、SonarLint

2016-03-17 13:47 GMT+01:00 Dinesh Bolkensteyn <dinesh.bo...@sonarsource.com>:
The binding doesn't seem to work on Windows for Maven projects: It tries to save a file containing the illegal ':' character in its name which fails

Thanks Dinesh, very good catch. I'll fix this.

Julien HENRY

未読、
2016/03/17 9:09:202016/03/17
To: steve.price、SonarLint
Hi Steve,

2016-03-17 13:16 GMT+01:00 steve.price <steve...@trustpayglobal.com>:
Firstly, thanks for getting this out to us.  I have installed the snapshot, but am getting an exception analysing any file:

Error during analysis
java.lang.NoClassDefFoundError: org/apache/log4j/Logger

I would be interested to know the version of the Java plugin you have on your SonarQube server.

Thanks,

Julien

Steve Price

未読、
2016/03/17 9:34:182016/03/17
To: Julien HENRY、SonarLint
Hi Julien,

Thanks for your response.  I was using a slightly out of date version, have not updated to 3.11 which is working OK, no exceptions now.

Just another question so that I have the correct expectations.  If we had a rule running on the sonarqube server (e.g. "pmd:ImmutableField") as part of the profile, would you expect that rule to be run after the project has been bound to the server rules?  I have noticed that the number of rules in the profile on the server and locally match, but the rules that are highlighted locally in eclipse do not match that on the server.

Many Thanks

Steve
--
Steve Price
Head of Development


Address:  
Phone:
Direct:

Email:
22 & 24 Frederick Sanger Road | Surrey Research Park | Guildford | Surrey | GU2 7YD
0207 871 3890
0207 871 3965
steve...@trustpayglobal.com


Julien HENRY

未読、
2016/03/17 9:42:032016/03/17
To: Steve Price、SonarLint
Very good question Steve. I forgot to mention in "known limitations" that SonarLint engine will only load/execute a subset of plugins installed on SonarQube server. Currently: java, javascript and php.

In upcoming releases we plan to unlock other SonarSource analyzers as well as custom rules plugins. But we have to be very careful to not degrade performance. Running external analyzers like PMD / JSLint is not in our plans.

Thanks for the feedback!

Alix Lourme

未読、
2016/03/17 11:07:222016/03/17
To: SonarLint、steve...@trustpayglobal.com
Hi,

+1 for :
- Remove localhost server
- "Illegal char <:> at index xx" (blocker issue for windows usage, provide an 'Error during analysis' (in SonarLint log) when file saved

Configuring a SonarQube server by Eclipse preferences (-pluginCustomization attribute in eclipse.ini) : OK !

SonarQube server view : "strange" menu on right mouse click (inherited of server usage ... but not very usefull for SonarLint server link) :


Proxy usage : KO

In server configuration widget : error "Fail to request https://nemo.sonarqube.org/api/authentication/validate?format=json" on test connection (and after when 'update')

Stacktrace :
Fail to request https://nemo.sonarqube.org/api/authentication/validate?format=json
java
.lang.IllegalStateException: Fail to request https://nemo.sonarqube.org/api/authentication/validate?format=json
    at org
.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:202)
    at org
.sonarqube.ws.client.HttpConnector.get(HttpConnector.java:144)
    at org
.sonarqube.ws.client.HttpConnector.call(HttpConnector.java:133)
    at org
.sonarsource.sonarlint.core.container.connected.SonarLintWsClient.rawGet(SonarLintWsClient.java:75)
    at org
.sonarsource.sonarlint.core.container.connected.validate.AuthenticationChecker.validateCredentials(AuthenticationChecker.java:36)
    at org
.sonarsource.sonarlint.core.container.connected.ConnectedContainer.validateCredentials(ConnectedContainer.java:69)
    at org
.sonarsource.sonarlint.core.SonarLintEngineImpl.validateCredentials(SonarLintEngineImpl.java:197)
    at org
.sonarlint.eclipse.core.internal.server.Server.testConnection(Server.java:219)
    at org
.sonarlint.eclipse.ui.internal.server.wizard.ServerConnectionTestJob.run(ServerConnectionTestJob.java:44)
    at org
.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Caused by: java.io.IOException: unexpected end of stream on Connection{nemo.sonarqube.org:443, proxy=HTTP @ [deleted]/[deleted]:80 hostAddress=[deleted] cipherSuite=none protocol=null} (recycle count=0)
    at com
.squareup.okhttp.internal.http.HttpConnection.readResponse(HttpConnection.java:211)
    at com
.squareup.okhttp.Connection.createTunnel(Connection.java:293)
    at com
.squareup.okhttp.Connection.connectTls(Connection.java:219)
    at com
.squareup.okhttp.Connection.connectSocket(Connection.java:201)
    at com
.squareup.okhttp.Connection.connect(Connection.java:172)
    at com
.squareup.okhttp.Connection.connectAndSetOwner(Connection.java:358)
    at com
.squareup.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:117)
    at com
.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:329)
    at com
.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:246)
    at com
.squareup.okhttp.Call.getResponse(Call.java:276)
    at com
.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:234)
    at com
.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:196)
    at com
.squareup.okhttp.Call.execute(Call.java:79)
    at org
.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:199)
   
... 9 more
Caused by: java.io.EOFException: \n not found: size=0 content=...
    at okio
.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:201)
    at com
.squareup.okhttp.internal.http.HttpConnection.readResponse(HttpConnection.java:191)
   
... 22 more

Wireshark analysis :

-------------------------------------------------------------------------->
CONNECT nemo
.sonarqube.org:443 HTTP/1.1
Host: nemo.sonarqube.org
Proxy-Connection: Keep-Alive
User-Agent: okhttp/2.6.0
--------------------------------------------------------------------------<
HTTP
/1.1 407 Proxy Authentication Required
Mime-Version: 1.0
Date: Thu, 17 Mar 2016 15:52:54 CET
Content-Type: text/html
Proxy-Authenticate: Basic realm="[deleted]"
Connection: close
Proxy-Connection: close
Content-Length: 1723
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" [...]
-------------------------------------------------------------------------->
CONNECT nemo
.sonarqube.org:443 HTTP/1.1
Host: nemo.sonarqube.org
Proxy-Connection: Keep-Alive
User-Agent: okhttp/2.6.0
Proxy-Authorization: Basic [deleted]
--------------------------------------------------------------------------<
Nothing ... strange

If a SonarQube instance is available somewhere in HTTP, it could be more simple for analysis ... I have not found so far :-(

Best regards
Auto Generated Inline Image 1

steve.price

未読、
2016/03/17 14:07:582016/03/17
To: SonarLint、steve...@trustpayglobal.com
Thanks for the info.  Does this mean that I need to find the equivalent sonar rule for "pmd:ImmutableField".  I understood that most of the rules had been implemented in a sonar analysers, is this correct?

Thanks again for your help.

Steve

Alix Lourme

未読、
2016/03/17 14:18:512016/03/17
To: SonarLint、steve...@trustpayglobal.com
Hi,

@Steve : Here the status of SonarQube implementation for pmd / checkstyle / findbugs rules. ImmutableField pmd rule is in pending part :-(.

Best regards.

Alix Lourme

未読、
2016/03/17 15:38:232016/03/17
To: SonarLint、steve...@trustpayglobal.com
Hi,

Another feedback about : connectivity: authentication, proxy :

For a SonarQube behind an reverse-proxy accessed from internet (=> @home -> internet -> httpS company reverse-proxy -> http SonarQube company) : It seems work !
I say "seems" because my test is on a SonarQube v4.5 LTS, so I receive a (logic) 404 on "api/system/status" on update ; but "Test connection" is successfull  => it smells good (when SonarQube v5 LTS will be deployed)

@Julien : My birthday is next month, but many thanks to you ;-).

Best regards.

Alix Lourme

未読、
2016/03/17 16:06:482016/03/17
To: SonarLint、steve...@trustpayglobal.com
Hi,

Proxy usage : KO - Caused by: java.io.EOFException: \n not found: size=0 content=...

Grrr, seems a okhttp bug (or strange behavior with my proxy). I will try ASAP in my job to reproduce it with a snippet on sonar-ws used like in sonarlint-core.
Perhaps could be fixed with last okhttp version, or some workaround filled in previous issue works.

Best regards
...

Julien HENRY

未読、
2016/03/18 11:30:282016/03/18
To: SonarLint、Alix Lourme
Hi guys,

I have uploaded a new milestone on the same update site:

Changes:
  - fixed issue with ":" in module key on Windows
  - added a link to trigger server update from the "bind wizard"
  - updated okhttp from 2.6.0 to 2.7.5 (@Alix let's see if it fix your proxy issue)
  - @SuppressWarnings support is back
  - select all/unselect all shortcut in "bind wizard"

Enjoy!


--
You received this message because you are subscribed to the Google Groups "SonarLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+...@googlegroups.com.

Alix Lourme

未読、
2016/03/18 12:00:392016/03/18
To: SonarLint、alix....@gmail.com
Hi Julien,


fixed issue with ":" in module key on Windows

LGTM


added a link to trigger server update from the "bind wizard"

The background is white and not grey ^^ (nitpicking mode :-p)



updated okhttp from 2.6.0 to 2.7.5 (@Alix let's see if it fix your proxy issue)

No :-(.

The problem occurs only on proxy+HTTPS (works fine with proxy + http SonarQube server).

Root cause seems to be in ok-io v1.6 (same version in okhttp 2.6.0 or 2.7.5).

I can reproduce it with the snippet code (using a simple url existing on SQ v4.5 & v5) :

        Authenticator.setDefault(new Authenticator() {
           
protected PasswordAuthentication getPasswordAuthentication() {
               
return new PasswordAuthentication(USER, PASSWORD.toCharArray());
           
}
       
});

       
final String url = "http://nemo.sonarqube.org/";
       
// final String url = "http://sonar.octavia.io/sonar/";
       
final HttpConnector connector = new HttpConnector.Builder().url(url).credentials(USER, PASSWORD).proxy(PROXY).proxyCredentials(USER, PASSWORD).build();

       
WsResponse response = connector.call(new GetRequest("api/server/index?format=json"));
       
System.out.println(response.code());
       
System.out.println(response.content());

I will try to do the same request with Apache httpclient ... because I'm currently lost abotu this bug (specific to my company network or not ; in addition wireshark is not trivial on SSL content).

[New question]

If a project doesn't exist on SonarQube, can we "fake" bind it on a specific SonarQube server ?
The objective is to have the equivalent of "offline" mode but with some defaults profiles defined on a SonarQube.

Thanks
Best regards
Auto Generated Inline Image 1

Julien HENRY

未読、
2016/03/18 12:30:302016/03/18
To: Alix Lourme、SonarLint
added a link to trigger server update from the "bind wizard"

The background is white and not grey ^^ (nitpicking mode :-p)


 
Good catch!


updated okhttp from 2.6.0 to 2.7.5 (@Alix let's see if it fix your proxy issue)

No :-(.

The problem occurs only on proxy+HTTPS (works fine with proxy + http SonarQube server).

Root cause seems to be in ok-io v1.6 (same version in okhttp 2.6.0 or 2.7.5).

I can reproduce it with the snippet code (using a simple url existing on SQ v4.5 & v5) :

        Authenticator.setDefault(new Authenticator() {
           
protected PasswordAuthentication getPasswordAuthentication() {
               
return new PasswordAuthentication(USER, PASSWORD.toCharArray());
           
}
       
});

       
final String url = "http://nemo.sonarqube.org/";
       
// final String url = "http://sonar.octavia.io/sonar/";
       
final HttpConnector connector = new HttpConnector.Builder().url(url).credentials(USER, PASSWORD).proxy(PROXY).proxyCredentials(USER, PASSWORD).build();

       
WsResponse response = connector.call(new GetRequest("api/server/index?format=json"));
       
System.out.println(response.code());
       
System.out.println(response.content());

I will try to do the same request with Apache httpclient ... because I'm currently lost abotu this bug (specific to my company network or not ; in addition wireshark is not trivial on SSL content).

I suggest we continue to discuss this issue on another thread.
 

[New question]

If a project doesn't exist on SonarQube, can we "fake" bind it on a specific SonarQube server ?
The objective is to have the equivalent of "offline" mode but with some defaults profiles defined on a SonarQube.


The cleanest solution is to provision the project on the remote SQ server. But currently nothing prevent you to bind any Eclipse project to any SQ module. You'll then use quality profile and settings of this module.


Thanks again for the feedback!

Alix Lourme

未読、
2016/03/18 13:27:112016/03/18
To: SonarLint、alix....@gmail.com
Hi,


I suggest we continue to discuss this issue on another thread.

Agree, I will open one when I found news about this problem.


The cleanest solution is to provision the project on the remote SQ server.

Agree ; but if you are in a strategy where only CI platform could create/publish analysis in SonarQube, the end-user has not this permission.


But currently nothing prevent you to bind any Eclipse project to any SQ module. You'll then use quality profile and settings of this module.

Good tips ! perfect. Thank you !

Best regards.

Julien HENRY

未読、
2016/03/22 13:18:502016/03/22
To: SonarLint
Hi guys,

I have uploaded one more milestone on the same update site. Few small changes and one important bug fixed: project level settings defined in SonarQube server were not taken into account by SonarLint in connected mode.

The plan is to publish the final release by the end of the week.

++

Julien

Alix Lourme

未読、
2016/03/22 14:49:492016/03/22
To: SonarLint、alix....@gmail.com
Hi,

I suggest we continue to discuss this issue on another thread.

Agree, I will open one when I found news about this problem.

IMO a problem with HTTPS through proxy, following in https://github.com/square/okhttp/issues/2426

Alix Lourme

未読、
2016/03/23 8:44:052016/03/23
To: SonarLint
Hi,

I have uploaded one more milestone on the same update site. Few small changes and one important bug fixed: project level settings defined in SonarQube server were not taken into account by SonarLint in connected mode.
The plan is to publish the final release by the end of the week.

Two minor feedbacks, not essential for release but useful for the future.

1) Manage the SonarQube minimum version requirement (mentioned as known limitation in first post)

When you configure a SonarQube v4.5 as endpoint (not supported, but LTS dude :)), the http://my.sonarqube.com/api/system/status URL throws a HTTP 404 (content doesn't exist).
In the SonarQube Servers view, the "update" on this server throws a error window with message "Unable to update data from server XXXX" ; the http 404 is displayed in details but a suffix in error message like "Only SonarQube v5.2 and more is supported" could be great.
This problem is a little more inconvenient when you don't use the SonarQube Servers view but directly the update function in Bind with SonarQube view : In this case when you click on "Update selected server", the message "Server is not updated" is always here (the error is in "Error Log" Eclipse tab, but not much users looks this). Perhaps the error message (see previous comment) could be writed somewhere.

2) Project selection in "manual mode"

When you want bind manually a project, the SonarQube Project zone is only clickable if you have previously select the project at left :



It is "logic", very minor when you have done once ... but a little disturbing the first time or when you have a multiple projects list.
Perhaps is there a way to have a selectable zone at right.

Best regards
Auto Generated Inline Image 1

Julien HENRY

未読、
2016/03/23 9:41:422016/03/23
To: Alix Lourme、SonarLint
Hi Alix,

1) Manage the SonarQube minimum version requirement (mentioned as known limitation in first post)

I will try to improve that (maybe in next version):
 
2) Project selection in "manual mode"

When you want bind manually a project, the SonarQube Project zone is only clickable if you have previously select the project at left :



Do you mean you can't edit the text field as long as row is not checked? If true it should be a Windows specific behavior since I don't reproduce this on Linux:
Images intégrées 1

Not sure I can easily change that (SWT components sometimes rely on native stuff) but I'll have a look. Is it affecting every Windows user?

Thanks

Julien

Alix Lourme

未読、
2016/03/23 9:56:522016/03/23
To: Julien HENRY、SonarLint
Hi,

1) Manage the SonarQube minimum version requirement (mentioned as known limitation in first post)
I will try to improve that (maybe in next version): https://jira.sonarsource.com/browse/SLE-44

Thanks


Do you mean you can't edit the text field as long as row is not checked?

Not exactly : I can't edit the text field as long I have not clicked on the (corresponding) row in Eclipse Project column.

Check (or not) the project in Eclipse project doesn't change anything :
Images intégrées 1

The Eclipse project row must be clicked once :
Images intégrées 2

After that the field is usable :
Images intégrées 3


Is it affecting every Windows user?

I don't know, I'm waiting the release for promote the usage in team/company :-(

Best regards

--
You received this message because you are subscribed to a topic in the Google Groups "SonarLint" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarlint/-PSdJvdXErI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarlint+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/CAD9wyxEQtDXbSYQLbOKAgT%3DxNPgSYMeSd8RPRv5%2BnH-p8MbQ2Q%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.



--
Alix Lourme

steve.price

未読、
2016/03/23 11:06:532016/03/23
To: SonarLint
Hi Julien,

Just a couple of small things.  

  • If I edit the server and change the url, it doesn't seem to take effect.  I need to remove it and add a new one for it to take a new url.
  • When viewing issues it would be useful to see the squid/rule reference.  This might already be there, but I cant seem to see it.
Many Thanks

Steve

Julien HENRY

未読、
2016/03/29 5:19:052016/03/29
To: Alix Lourme、SonarLint
Hi Alix,

2016-03-23 13:44 GMT+01:00 Alix Lourme <alix....@gmail.com>:
1) Manage the SonarQube minimum version requirement (mentioned as known limitation in first post)

When you configure a SonarQube v4.5 as endpoint (not supported, but LTS dude :)), the http://my.sonarqube.com/api/system/status URL throws a HTTP 404 (content doesn't exist).
In the SonarQube Servers view, the "update" on this server throws a error window with message "Unable to update data from server XXXX" ; the http 404 is displayed in details but a suffix in error message like "Only SonarQube v5.2 and more is supported" could be great.
This problem is a little more inconvenient when you don't use the SonarQube Servers view but directly the update function in Bind with SonarQube view : In this case when you click on "Update selected server", the message "Server is not updated" is always here (the error is in "Error Log" Eclipse tab, but not much users looks this). Perhaps the error message (see previous comment) could be writed somewhere.


Behavior when trying to connect to an incompatible version should be improved. Also we decided to try to support LTS. But that's will be for next sprint:
 
2) Project selection in "manual mode"

When you want bind manually a project, the SonarQube Project zone is only clickable if you have previously select the project at left :



It is "logic", very minor when you have done once ... but a little disturbing the first time or when you have a multiple projects list.
Perhaps is there a way to have a selectable zone at right.

Very annoying indeed. I have reproduced on Windows. Also noticed that project are not checked by default. I'll try to fix that...

Thanks

Julien HENRY

未読、
2016/03/29 5:21:042016/03/29
To: steve.price、SonarLint
Hi Steve,

2016-03-23 16:06 GMT+01:00 steve.price <steve...@trustpayglobal.com>:
  • If I edit the server and change the url, it doesn't seem to take effect.  I need to remove it and add a new one for it to take a new url.

Good catch! I'll fix it.
 
  • When viewing issues it would be useful to see the squid/rule reference.  This might already be there, but I cant seem to see it.
It is already possible to add a new column in issues view to see rule key (configure columns). But I'll also add the rule key in rule description view:

Thanks for the feedback!

メッセージは削除されました

sste...@gmail.com

未読、
2016/03/29 6:03:062016/03/29
To: SonarLint
Hi,

Is there an easy way to run the analyser over an entire (maven) project? I don't particularly want to have to individually analyse each class, especially in a large project.

It'd be good to have an option to analyse at project, package, & source folder level? 

Thanks,
Scott

sste...@gmail.com

未読、
2016/03/29 6:13:192016/03/29
To: SonarLint
Also,

I think moving the severity in the Issues view to it's own column would be great. A filter on this column would be awesome.

Cheers,
Scott

Scott Steen

未読、
2016/03/29 6:39:272016/03/29
To: SonarLint
Found an issue in connected mode - issues in Lint do not match Qube. SonarServer was updated just before running Analyze. SonarQube results produced by cmd line sonar scanner.

Lint
Qube

Thanks,
Scott

Julien HENRY

未読、
2016/03/29 8:56:092016/03/29
To: sste...@gmail.com、SonarLint
Hi Steve,

2016-03-29 12:01 GMT+02:00 <sste...@gmail.com>:
Is there an easy way to run the analyser over an entire (maven) project? I don't particularly want to have to individually analyse each class, especially in a large project.

It'd be good to have an option to analyse at project, package, & source folder level?

We removed this feature to prevent SonarLint mission to be denatured. SonarLint focus on very fast on the fly analysis. What you expect is a batch process like SonarQube scanners do. This is not easy to achieve both in term of optimization. Issues view is not intended to display more than 100 issues.
If you want to do a full batch analysis of your project, then why not using SonarQube scanners and publish results in SonarQube itself?

I think moving the severity in the Issues view to it's own column would be great. A filter on this column would be awesome.

There is a group by feature but then you'll loose the ability to sort by age:
Images intégrées 1

Found an issue in connected mode - issues in Lint do not match Qube. SonarServer was updated just before running Analyze. SonarQube results produced by cmd line sonar scanner.

The issue about duplication reported by SonarQube and not detected by SonarLint is expected since we don't compute duplications (too costly for on the fly analysis).

The issue "make 'addDate' a static method" detected by SonarLint and not by SonarQube probably means you forgot to configure property sonar.java.binaries during your SonarQube analysis. As far as I remember this rule requires to access bytecode. SonarLint automatically configure this property based on Eclipse classpath.

Thanks for testing!

Julien

Scott Steen

未読、
2016/03/29 9:32:312016/03/29
To: SonarLint
Hi Julien,
 
We removed this feature to prevent SonarLint mission to be denatured. SonarLint focus on very fast on the fly analysis. What you expect is a batch process like SonarQube scanners do. This is not easy to achieve both in term of optimization. Issues view is not intended to display more than 100 issues.
If you want to do a full batch analysis of your project, then why not using SonarQube scanners and publish results in SonarQube itself?

I think that's a shame, but you guys have your reasons! I'll just bind to a shortcut and try to remember to hit it. My problem is that I tend to do a chunk of work then want to see what issues I've introduced (in eclipse).

There is a group by feature but then you'll loose the ability to sort by age:
Images intégrées 1

That looks like what I'm after! Can I ask how you enable this? 

Totally right on the binaries setting. Had this commented out for some reason!

Thanks,
Scott

Julien HENRY

未読、
2016/03/29 9:44:412016/03/29
To: Scott Steen、SonarLint

2016-03-29 15:32 GMT+02:00 Scott Steen <sste...@gmail.com>:
That looks like what I'm after! Can I ask how you enable this? 

Images intégrées 1

tahitia...@gmail.com

未読、
2016/03/29 19:32:232016/03/29
To: SonarLint
Hi,

I've installed the latest version and I'm using it with Eclipse mars.2 under windows 7.
I've successfully configured my sonar server and bound all my projects.
Unfortunately the Sonarlint issues view remains empty even after an analyze.

Am I the only one getting this behavior?

Gabriel.

Julien HENRY

未読、
2016/03/30 2:51:192016/03/30
To: tahitia...@gmail.com、SonarLint
Hi Gabriel,

For existing projects prior to installation of the plugin SonarLint builder is not automatically enabled. This is something I will change before final 2.0 release. Go to project properties -> SonarLint and check "Run SonarLint automatically":
Images intégrées 1

++

Julien

--
You received this message because you are subscribed to the Google Groups "SonarLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/6e710bee-f9a5-4a4e-b594-042ce9de4f43%40googlegroups.com.

Julien HENRY

未読、
2016/03/30 9:32:042016/03/30
To: SonarLint
Hi guys,

I just pushed another milestone (M4) on the same update site. All previously reported issues should be fixed.

Hopefully this will be the last milestone prior to the final release.

++

Julien

Alix Lourme

未読、
2016/03/30 9:47:012016/03/30
To: SonarLint
HI,

Very minor issue reproduced on M3/M4 : When I start/restart Eclipse on an existing workspace (not a new), this stack appears in Error Log sheet :

org.eclipse.swt.SWTException: Unable to create font "org.eclipse.jface.textfont" in a non-UI thread. Using default font instead.
    at org
.eclipse.jface.resource.FontRegistry.getFontRecord(FontRegistry.java:685)
    at org
.eclipse.jface.resource.FontRegistry.get(FontRegistry.java:616)
    at org
.eclipse.jface.resource.JFaceResources.getFont(JFaceResources.java:304)
    at org
.eclipse.ui.console.TextConsole.getDefaultFont(TextConsole.java:224)
    at org
.eclipse.ui.console.TextConsole.getFont(TextConsole.java:213)
    at org
.eclipse.ui.console.TextConsole.setFont(TextConsole.java:235)
    at org
.sonarlint.eclipse.ui.internal.console.SonarLintConsole.initStreams(SonarLintConsole.java:81)
    at org
.sonarlint.eclipse.ui.internal.console.SonarLintConsole.<init>(SonarLintConsole.java:65)
    at org
.sonarlint.eclipse.ui.internal.SonarLintUiPlugin.getSonarConsole(SonarLintUiPlugin.java:107)
    at org
.sonarlint.eclipse.ui.internal.SonarLintUiPlugin.start(SonarLintUiPlugin.java:56)
    at org
.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:771)
   
[...]
    at org
.eclipse.ui.internal.decorators.DecorationScheduler$1.run(DecorationScheduler.java:332)
    at org
.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Precision : I start Eclipse with this preference loaded by -pluginCustomization mechanism (but no evident link) :

org.sonarlint.eclipse.core/servers/MySonarQube/url=http\://sonarqube.comany.com
org
.sonarlint.eclipse.core/servers/MySonarQube/name=SonarQube
org
.sonarlint.eclipse.core/servers/MySonarQube/auth=true
org
.sonarlint.eclipse.core/servers/initialized=true

Technical environment :
* OS : Windows 7
* Arch : 64b
* Eclipse : Mars SR2 (4.5.2)

Alix Lourme

未読、
2016/03/30 10:04:072016/03/30
To: SonarLint
Hi Julien,

I discover a new more inconvenient error on M4, potentially linked with last evolutions about projects & SonarLint association ...

When you have some closed projects in your workspace, not "linked" to SonarLint (like a test project or "Servers" directory if you are using Tomcat), this error occurs at start on the first closed project :

java.lang.IllegalStateException: Unable to find project for resource P/MyProjectXXX
    at org
.sonarlint.eclipse.core.internal.resources.SonarLintProject.getInstance(SonarLintProject.java:51)
    at org
.sonarlint.eclipse.core.internal.SonarLintCorePlugin$1.run(SonarLintCorePlugin.java:144)
    at org
.eclipse.core.internal.jobs.Worker.run(Worker.java:55)


Best regards.


Le mercredi 30 mars 2016 15:32:04 UTC+2, Julien HENRY a écrit :

Julien HENRY

未読、
2016/03/30 11:36:522016/03/30
To: Alix Lourme、SonarLint
Hi Alix,

Both issues should be fixed in master.

Thanks

Julien

--
You received this message because you are subscribed to the Google Groups "SonarLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+...@googlegroups.com.

Alix Lourme

未読、
2016/03/30 14:19:112016/03/30
To: SonarLint、alix....@gmail.com
Cool ! Many thanks !

tahitia...@gmail.com

未読、
2016/03/30 16:37:072016/03/30
To: SonarLint
With a fresh Eclipse Mars.2 install with the latest SonarLint M4, I'm having strange SonarQube view with read squares :


In the mean time, there are the 3 following errors in the error log console :
java.io.IOException: Unable to resolve plug-in "platform:/plugin/org.sonar.ide.eclipse.ui/icons/onde-sonar-16.png".
Unable to resolve plug-in "platform:/plugin/org.sonar.ide.eclipse.ui/icons/onde-sonar-16.png".
Invalid input url:platform:/plugin/org.sonar.ide.eclipse.ui/icons/onde-sonar-16.png

I can post the full stacktraces if you need them.

Gabriel.
Auto Generated Inline Image 1

tahitia...@gmail.com

未読、
2016/03/30 17:20:092016/03/30
To: SonarLint、tahitia...@gmail.com
Julien,

I have checked "Run SonarLint automatically", but still the view remains empty...
Is there a log file somewhere to help us find what is going on?

Regards,
Gabriel.

toman...@gmail.com

未読、
2016/03/31 0:25:502016/03/31
To: SonarLint
Hi Julien,

I have a checkstyle customized rule in SonarQube server but I can't find any violations when I analyzed a file. I already updated the sonarqube server in my eclipse.

Regards,
Sharon

Julien HENRY

未読、
2016/03/31 3:16:352016/03/31
To: Gabriel Landon、SonarLint
Hi Gabriel,

2016-03-30 22:37 GMT+02:00 <tahitia...@gmail.com>:
With a fresh Eclipse Mars.2 install with the latest SonarLint M4, I'm having strange SonarQube view with read squares :

As far as I know this is a bug of Eclipse not properly updating/uninstalling plugins (here I guess you uninstalled the old SonarQube plugin). I usually fix that by dropping the file workspace/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi but that will make you loose all your workbench configuration (perspective customization).

I have checked "Run SonarLint automatically", but still the view remains empty...
Is there a log file somewhere to help us find what is going on?

Julien HENRY

未読、
2016/03/31 3:20:582016/03/31
To: toman...@gmail.com、SonarLint
Hi Sharon,

2016-03-31 6:25 GMT+02:00 <toman...@gmail.com>:
have a checkstyle customized rule in SonarQube server but I can't find any violations when I analyzed a file. I already updated the sonarqube server in my eclipse.

We are only supporting rules from SonarSource analyzers for language Java, JavaScript and PHP.

++

Julien

Milhan KIM

未読、
2016/03/31 3:47:062016/03/31
To: Julien HENRY、SonarLint
Do you have any further plan to support custom plugins?

I also have custom plugins and it would be nice to see them working with SonarLints.

Milhan.

2016년 3월 31일 (목) 오후 4:21, Julien HENRY <julien...@sonarsource.com>님이 작성:
--
You received this message because you are subscribed to the Google Groups "SonarLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+...@googlegroups.com.

Freddy Mallet

未読、
2016/03/31 12:40:062016/03/31
To: Milhan KIM、Julien HENRY、SonarLint
Hi Mihan,

If you're talking about custom plugins containing some custom rules based SonarSource analyzers, yes that's in the plan. 

Kind regards,
Freddy


For more options, visit https://groups.google.com/d/optout.
--
Freddy MALLET | SonarSource
Product Director & Co-Founder
http://sonarsource.com

tahitia...@gmail.com

未読、
2016/03/31 18:33:442016/03/31
To: SonarLint、tahitia...@gmail.com
Thank you for your help Julien.

At first I did not realize that sonarlint was only analyzing a file when it is saved.
I thought the plugin was getting all the issues from the sonarqube server for the whole project.
Is there a way to have all the issues of the project without saving each files individually?

Regards,
Gabriel.



Le mercredi 30 mars 2016 21:16:35 UTC-10, Julien HENRY a écrit :
Hi Gabriel,

Milhan KIM

未読、
2016/03/31 20:33:442016/03/31
To: Freddy Mallet、Julien HENRY、SonarLint
Thanks a lot for quick replies Julien and Freddy!

And yes, I meant custom plugin ( implements Sensor ), which uses JDT.

Sounds like my team needs to seriously consider moving to SonarSource Analyzers.


Milhan.

2016년 4월 1일 (금) 오전 1:40, Freddy Mallet <freddy...@sonarsource.com>님이 작성:

kundansa...@gmail.com

未読、
2016/06/02 8:43:032016/06/02
To: SonarLint
Hi Henry

I have installed sonarlint plugin in my eclipse mars.
when I tried to connect it using nemo sonar server using the information you have provided below.
I got below error.

==================================================================
No storage for server 'nemo'. Please update.
java.lang.IllegalStateException: Fail to request https://nemo.sonarqube.org/api/system/status
at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:202)
at org.sonarqube.ws.client.HttpConnector.get(HttpConnector.java:144)
at org.sonarqube.ws.client.HttpConnector.call(HttpConnector.java:133)
at org.sonarsource.sonarlint.core.container.connected.SonarLintWsClient.rawGet(SonarLintWsClient.java:98)
at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.fetchServerInfos(ServerVersionAndStatusChecker.java:97)
at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.checkVersionAndStatus(ServerVersionAndStatusChecker.java:61)
at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.checkVersionAndStatus(ServerVersionAndStatusChecker.java:51)
at org.sonarsource.sonarlint.core.WsHelperImpl.validateConnection(WsHelperImpl.java:50)
at org.sonarsource.sonarlint.core.WsHelperImpl.validateConnection(WsHelperImpl.java:45)
at org.sonarlint.eclipse.core.internal.server.Server.testConnection(Server.java:244)
at org.sonarlint.eclipse.ui.internal.server.wizard.ServerConnectionTestJob.run(ServerConnectionTestJob.java:44)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at sun.security.ssl.Alerts.getSSLException(Unknown Source)
at sun.security.ssl.Alerts.getSSLException(Unknown Source)
at sun.security.ssl.SSLSocketImpl.recvAlert(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at com.squareup.okhttp.internal.io.RealConnection.connectTls(RealConnection.java:192)
at com.squareup.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:149)
at com.squareup.okhttp.internal.io.RealConnection.connect(RealConnection.java:112)
at com.squareup.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:184)
at com.squareup.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:126)
at com.squareup.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:95)
at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:281)
at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:224)
at com.squareup.okhttp.Call.getResponse(Call.java:286)
at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:243)
at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:205)
at com.squareup.okhttp.Call.execute(Call.java:80)
at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:199)
... 11 more

No storage for server 'nemo'. Please update.
No storage for server 'nemo'. Please update.
======================================================================
can you please help me on this.

On Thursday, March 17, 2016 at 5:17:07 PM UTC+5:30, Julien HENRY wrote:
Hi guys,

I'm very please to start the feedback period for SonarLint Eclipse 2.0.

The main feature is of course the connected experience. 

Update site:

Release notes:

We are especially interested by feedback regarding:
  * connectivity: authentication, proxy
  * usability: are all wordings clear, menus easy to find, wizards easy to use?
  * performance: compared to "standalone" mode with no relation with SonarQube

In case of error don't forget to provide all details (look at SonarLint console in debug mode, and also in Eclipse "Error log" view).

Known limitations:
  * Minimal supported SonarQube version is 5.2.
  * There is currently no issue tracking: it means there is no matching between issues reported by SonarLint and remote issues on SonarQube server. As a result issues flagged as false positive/won't fix are not muted in SonarLint. This will come in another version.

More details:

Typical use case:
  1) Configure a new server: either from "SonarQube server" view or use File -> New -> Others... -> SonarLint -> New Server

Images intégrées 1
  
2) After adding the server an update process should start and get all required data from server
Images intégrées 2

3) Bind your Eclipse projects with their remote project/module on the configured server. Select one or more projects -> SonarLint -> Bind with remote SonarQube server...
The wizard allow to manually search for the matching remote project (by name or key) and also provide an "auto bind" feature that tries to find best match based on Eclipse project name.
Images intégrées 3

4) That's it! Now your code is analyzed by SonarLint using rules / quality profiles configured on the SonarQube server.

5) If there is a change on server side (update analyzer, change quality profile, ...), you have to manually trigger an update for SonarLint to "see" it:
Images intégrées 4

Enjoy!

Julien HENRY

未読、
2016/06/02 8:47:042016/06/02
To: SonarLint、kundansa...@gmail.com
Hi,

Please open a new thread instead of replying to an old one.

++

Julien
全員に返信
投稿者に返信
転送
新着メール 0 件