Details

    • Type: Task Task
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.1
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      This is not used as sources are already imported by Java plugin. Also it is no more working in SonarQube 3.7.

        Activity

        Hide
        Fabrice Bellingard added a comment -

        Plugins should never have to handle this import of sources.

        Checked.

        Show
        Fabrice Bellingard added a comment - Plugins should never have to handle this import of sources. Checked.
        Hide
        Jerome Van Der Linden added a comment -

        Hi,

        Since the AndroidSourcesImporter has been removed, it is not possible to create a new profile including only a subset of Android Lint rules (with a lint.xml file) as it is possible with findbugs/pmd/checkstyle, or even a profile including Android Lint/Findbugs/Pmd/Checkstyle rules.

        Actually, it is only possible to execute with one profile (-Dsonar.profile="Android Lint"), how to execute both android and others tools ?

        Has ProfileImporter concept been removed in sonarqube ?

        Show
        Jerome Van Der Linden added a comment - Hi, Since the AndroidSourcesImporter has been removed, it is not possible to create a new profile including only a subset of Android Lint rules (with a lint.xml file) as it is possible with findbugs/pmd/checkstyle, or even a profile including Android Lint/Findbugs/Pmd/Checkstyle rules. Actually, it is only possible to execute with one profile (-Dsonar.profile="Android Lint"), how to execute both android and others tools ? Has ProfileImporter concept been removed in sonarqube ?
        Hide
        Evgeny Mandrikov added a comment -

        @Jerome AndroidSourcesImporter has nothing to do with rules - it's about importing source code.

        Show
        Evgeny Mandrikov added a comment - @Jerome AndroidSourcesImporter has nothing to do with rules - it's about importing source code.
        Hide
        Evgeny Mandrikov added a comment -

        And if you have troubles with plugin, then please use Users Mailing List to ask questions.

        Show
        Evgeny Mandrikov added a comment - And if you have troubles with plugin, then please use Users Mailing List to ask questions.
        Hide
        Jerome Van Der Linden added a comment -

        I suppose you don't know who am I since your consider me as a user... I'm the co-author of the initial version of the sonar android lint plugin that has been moved to Sonar plugin community after I spoke to Freddy Mallet.

        "Copyright (C) 2013 SonarSource and Jerome Van Der Linden, Stephane Nicolas, Florian Roncari, Thomas Bores"

        Now that you know, I hope I can answer here and not on user ml. I would like to create issues but I can't... so I took this one to speak about the rule importer. I don't care about the source importer, you are totally right.

        I had a ProfileImporter in the initial version that permit to do the feature I describe above (https://github.com/jeromevdl/sonar-android-lint-plugin/blob/master/src/main/java/org/sonar/plugins/android/lint/AndroidLintProfileImporter.java). This class has been removed during issue SONARPLUGINS-3065 (https://github.com/SonarCommunity/sonar-android/commit/220daeaf81027b47c00a74bad91ef9a0fc969def#diff-72e5fa0714f849107d4d415f115b8133). Why ? Maybe it was not compliant with all the refactoring that has been done, but maybe it could have been refactored instead of removed ?

        An android project still a java project, so we may have android lint checks but also findbugs, pmd, checkstyle... We could do that with the ProfileImporter. It is not possible anymore now.

        Show
        Jerome Van Der Linden added a comment - I suppose you don't know who am I since your consider me as a user... I'm the co-author of the initial version of the sonar android lint plugin that has been moved to Sonar plugin community after I spoke to Freddy Mallet. "Copyright (C) 2013 SonarSource and Jerome Van Der Linden, Stephane Nicolas, Florian Roncari, Thomas Bores" Now that you know, I hope I can answer here and not on user ml. I would like to create issues but I can't... so I took this one to speak about the rule importer. I don't care about the source importer, you are totally right. I had a ProfileImporter in the initial version that permit to do the feature I describe above ( https://github.com/jeromevdl/sonar-android-lint-plugin/blob/master/src/main/java/org/sonar/plugins/android/lint/AndroidLintProfileImporter.java ). This class has been removed during issue SONARPLUGINS-3065 ( https://github.com/SonarCommunity/sonar-android/commit/220daeaf81027b47c00a74bad91ef9a0fc969def#diff-72e5fa0714f849107d4d415f115b8133 ). Why ? Maybe it was not compliant with all the refactoring that has been done, but maybe it could have been refactored instead of removed ? An android project still a java project, so we may have android lint checks but also findbugs, pmd, checkstyle... We could do that with the ProfileImporter. It is not possible anymore now.
        Hide
        Julien HENRY added a comment -

        @Jerome as Evgeny said it would be better to have this discussion on the dev mailing list. But here we go:

        • it is of course still possible to have a profile with both standard Java rules and Android Lint rules. For example just create a new profile by duplicating default Sonar Way then add Android Lint rules. Or duplicate default Android Lint profile then add the checkstyle/PMD/findbugs rules you want.
        • but you are right that I was maybe too quick to remove ProfileImporter. I forgot it was not only used internally to create the initial default "Android Lint" profile (this part was completely reworked) but also to import existing Android Lint configuration in a new profile. I have created SONARPLUGINS-3177.
        Show
        Julien HENRY added a comment - @Jerome as Evgeny said it would be better to have this discussion on the dev mailing list. But here we go: it is of course still possible to have a profile with both standard Java rules and Android Lint rules. For example just create a new profile by duplicating default Sonar Way then add Android Lint rules. Or duplicate default Android Lint profile then add the checkstyle/PMD/findbugs rules you want. but you are right that I was maybe too quick to remove ProfileImporter. I forgot it was not only used internally to create the initial default "Android Lint" profile (this part was completely reworked) but also to import existing Android Lint configuration in a new profile. I have created SONARPLUGINS-3177 .

          People

          • Assignee:
            Julien HENRY
            Reporter:
            Julien HENRY
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: