diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000000..e19e66417e --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,76 @@ +name: sonar-release +# This workflow is triggered when publishing a new github release +on: + release: + types: + - published + +env: + PYTHONUNBUFFERED: 1 + +jobs: + release: + permissions: + id-token: write + contents: write + uses: SonarSource/gh-action_release/.github/workflows/main.yaml@v5 + with: + publishToBinaries: false + mavenCentralSync: false + slackChannel: squad-ide-visualstudio + + deploy_to_microsoft_marketplace: + permissions: + id-token: write + contents: write + runs-on: windows-latest + name: Deploy to Visual Studio marketplace + # TODO: Uncomment this once releasability checks are confirmed to be working + # needs: release + env: + RELEASE_TAG: ${{ github.event.release.tag_name }} + steps: + - uses: actions/checkout@v3 + - name: Get vault secrets + id: secrets + uses: SonarSource/vault-action-wrapper@v3 + with: + secrets: | + development/artifactory/token/{REPO_OWNER_NAME_DASH}-private-reader access_token | ARTIFACTORY_ACCESS_TOKEN; + development/kv/data/visualstudio VSCE_TOKEN | VCSE_TOKEN + + - name: Setup JFrog + uses: SonarSource/jfrog-setup-wrapper@907e87c3d2081a98d2ab8cb03284ee6711f1ee83 # tag=3.2.3 + with: + jfrogAccessToken: ${{ fromJSON(steps.secrets.outputs.vault).ARTIFACTORY_ACCESS_TOKEN }} + + - name: Create local directory + id: local_repo + shell: bash + run: echo "dir=$(mktemp -d repo.XXXXXXXX)" >> $GITHUB_OUTPUT + + - name: Get the version + id: get_version + shell: bash + run: | + IFS=. read -r major minor patch build <<< "$RELEASE_TAG" + echo "build=${build}" >> $GITHUB_OUTPUT + echo "version=${major}.${minor}.${patch}" >> $GITHUB_OUTPUT + + - name: Download Artifacts + uses: SonarSource/gh-action_release/download-build@master + with: + build-number: ${{ steps.get_version.outputs.build }} + local-repo-dir: ${{ steps.local_repo.outputs.dir }} + # TODO: Change this to sonarsource-public-releases once releasability checks are confirmed to be working + remote-repo: sonarsource-public-builds + flat-download: true + download-checksums: false + + - name: Publish extension to Marketplace + uses: cezarypiatek/VsixPublisherAction@1.1 + with: + extension-file: ${{ steps.local_repo.outputs.dir }}\SonarLint.VSIX-${{env.RELEASE_TAG}}-2022.vsix + # TODO: Rename VS2022Test to VS20202 when doing actual release + publish-manifest-file: MarketPlaceFiles\VS2022Test\manifest-2022.json + personal-access-code: ${{ fromJSON(steps.secrets.outputs.vault).VCSE_TOKEN }} diff --git a/MarketPlaceFiles/VS2022Test/manifest-2022.json b/MarketPlaceFiles/VS2022Test/manifest-2022.json new file mode 100644 index 0000000000..dfbb31eed5 --- /dev/null +++ b/MarketPlaceFiles/VS2022Test/manifest-2022.json @@ -0,0 +1,13 @@ +{ + "$schema": "http://json.schemastore.org/vsix-publish", + "categories": [ "Coding", "Programming Languages", "Security" ], + "identity": { + "internalName": "SonarLintforVisualStudio2022Test" + }, + "overview": "overview-2022.md", + "priceCategory": "free", + "publisher": "SonarSource", + "private": true, + "qna": false, + "repo": "https://github.com/SonarSource/sonarlint-visualstudio" +} diff --git a/MarketPlaceFiles/VS2022Test/overview-2022.md b/MarketPlaceFiles/VS2022Test/overview-2022.md new file mode 100644 index 0000000000..d6df5d9e8e --- /dev/null +++ b/MarketPlaceFiles/VS2022Test/overview-2022.md @@ -0,0 +1,150 @@ +## **SonarLint: Your first line of defense for quality and secure code** + +SonarLint helps you detect and fix Bugs, Code Smells, and Security Vulnerabilities in-IDE. + +It supports C#, VB.NET, C, C++, JS, and TS. The extension highlights coding flaws on the fly and provides clear guidance to fix issues before code is committed. + +## **What is SonarLint** + +SonarLint is a **_Free_** and **_Open Source_** IDE extension that identifies and helps you fix Code Quality and Code Security issues as you code. Analogous to a spell checker, SonarLint squiggles flaws and provides real-time feedback and clear remediation guidance so you can deliver clean code from the get-go. + +SonarLint for Visual Studio is more than your average linting tool. + + + +* Scans code written in C#, VB.NET, C, C++, Javascript, TypeScript. +* Open source JavaScript, TypeScript, C# & VB.NET code analyzers. +* C and C++ support for Application, Dynamic Library and Static Library types of MSBuild (.vcxproj) projects +* Deep code analysis algorithms using pattern matching and dataflow analysis +* Hundreds of language-specific static code analysis rules, and growing +* In-context help and remediation guidance with detailed examples + + Highlights issues in your code, tells you why they are harmful, and how they should be fixed + + +SonarLint provides Visual Studio developers a comprehensive in-IDE solution for improving the quality and security of the code they deliver. + +[Learn More](https://www.sonarsource.com/products/sonarlint/features/visual-studio/) + + +![sonarlint-warnings](https://raw.githubusercontent.com/wiki/SonarSource/sonarlint-visualstudio/images/Marketplace/squiggly.png) + +## **Get Started with SonarLint** + +After you download SonarLint, simply open a project, start coding and SonarLint will start analyzing your issues. + +You can also check out the [SonarLint documentation here](https://docs.sonarsource.com/sonarlint/visual-studio/). + +![sonarlint-installation](https://raw.githubusercontent.com/wiki/SonarSource/sonarlint-visualstudio/images/Marketplace/2022-install.PNG) + + +## **Why SonarLint** + +With unparalleled support for C#, VB.NET, C, C++, JavaScript, and TypeScript, SonarLint performs on-the-fly smart analysis to ensure that the code you deliver is always high quality and secure. + + + +* **Instant feedback on coding issues** + + SonarLint provides immediate feedback on Bugs, Code Smells, and Security Vulnerabilities as you code. + +* **Hundreds of language-specific rules with clear guidance** + + SonarLint provides you with all the information on why the highlighted issue is problematic and how to fix it. With clear remediation guidance and plenty of detailed examples, addressing issues is simple and intuitive. + + + Check out the language specific rules: + + +
+C# + | +View Rules + | +
VB.NET + | +View Rules + | +
JavaScript + | +View Rules + | +
TypeScript + | +View Rules + | +
C++ + | +View Rules + | +
C + | +View Rules + | +