Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The procedure is intended to be launched from a PCTRun task as it's retrieving it's parameters from PCTRun. Supported parameters:

ParameterDescription
sonarlintInstallation Directory of the Sonarlint CLI
SelectedFileThe full pathname of the selected file or folder - ${selected_resource_loc}
sourceEncodingThe sourcecodes code page
dlcThe OpenEdge installation directory
propathThe PROPATH required to analyze the source
databasesComma delimited list of .df files required for analyzing the sourcecoude

...

Code Block
languagexml
themeEclipse
titleSample sonarlint.xml ANT script
linenumberstrue
<?xml version="1.0" encoding="utf-8"?>

<project name="SmartComponent Library" default="SonarSource"
    basedir="." xmlns:sonar="antlib:org.sonar.ant">

    <description>SmartComponent Library</description>

    <property environment="env" />
    <property file="build/build.props" />

    <!-- Définition des tâches externes -->
    <taskdef resource="PCT.properties" classpath="/Progress/PCT116/ant/lib/PCT.jar" />
    
    <target name="sonarlint">
        
        <PCTRun procedure="Consultingwerk/Studio/SonarLintLauncher/sonarlint.p" 
            graphicalMode="true" dlcHome="${progress.DLC}" cpinternal="iso8859-1" cpstream="iso8859-1"
            compileUnderscore="true" inputchars="2000000" token="4000" tempDir="c:\temp">

            <Parameter name="sonarlint" value="${sonarlint}"/>
            <Parameter name="SelectedFile" value="${SelectedFile}"/>
            <Parameter name="sourceEncoding" value="${sourceEncoding}"/>
            <Parameter name="dlc" value="${dlc}"/>
            <Parameter name="propath" value="${propath}"/>
            <Parameter name="databases" value="${databases}"/>
        </PCTRun>    
    
    </target>
</project>    

...

SettingDescription
NameThe name for the External Tools Run Configuration
BuildfileYou ANT script, based on above example
Base DirectoryThe sourcecode's project root
Arguments

-Dsonarlint=c:\Progress\sonarlint-cli
-DSelectedFile=${selected_resource_loc}
-DsourceEncoding=iso8859-1
-Ddlc=/Progress/OpenEdge116_64
-Dpropath=.,src,Consultingwerk/Studio/ProdictDumpHack/src,OERA
-Ddatabases=../DB/build/SmartDB/smartdb.df,../DB/build/icfdb/icfdb.df,../DB/build/Sports2000/sports2000.df

Refresh resources upon completionChecked, Specific resources, select the .sonarlint directory in your project root folder, available after first run only
Common → Save asShared File, specify a file name to share this configuration with team mates

...