{"id":19359767,"url":"https://github.com/codacy/codacy-sonar-csharp","last_synced_at":"2025-04-23T11:32:53.627Z","repository":{"id":19847259,"uuid":"88060608","full_name":"codacy/codacy-sonar-csharp","owner":"codacy","description":"Docker engine for SonarC# code analyzer","archived":false,"fork":false,"pushed_at":"2025-01-29T15:26:09.000Z","size":1049,"stargazers_count":7,"open_issues_count":5,"forks_count":5,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-20T11:43:58.054Z","etag":null,"topics":["codacy","csharp","docker","review","sonar","static-analysis"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codacy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-12T14:22:56.000Z","updated_at":"2024-10-22T16:28:10.000Z","dependencies_parsed_at":"2023-02-18T02:01:01.427Z","dependency_job_id":"85c06c30-14b8-48a9-893f-cb1ba8266635","html_url":"https://github.com/codacy/codacy-sonar-csharp","commit_stats":null,"previous_names":[],"tags_count":114,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codacy%2Fcodacy-sonar-csharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codacy%2Fcodacy-sonar-csharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codacy%2Fcodacy-sonar-csharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codacy%2Fcodacy-sonar-csharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codacy","download_url":"https://codeload.github.com/codacy/codacy-sonar-csharp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250425580,"owners_count":21428583,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["codacy","csharp","docker","review","sonar","static-analysis"],"created_at":"2024-11-10T07:16:04.950Z","updated_at":"2025-04-23T11:32:53.190Z","avatar_url":"https://github.com/codacy.png","language":"C#","readme":"[![Codacy Badge](https://api.codacy.com/project/badge/Grade/ff929008ec754fe790738a9a15821f93)](https://www.codacy.com/gh/codacy/codacy-sonar-csharp?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=codacy/codacy-sonar-csharp\u0026utm_campaign=Badge_Grade)\n[![Build Status](https://circleci.com/gh/codacy/codacy-sonar-csharp.svg?style=shield\u0026circle-token=:circle-token)](https://circleci.com/gh/codacy/codacy-sonar-csharp)\n\n# Codacy SonarC#\n\nThis is the docker engine we use at Codacy to run [SonarC#](https://github.com/SonarSource/sonar-csharp) developed by SonarSource.\n\nYou can also create a docker to integrate the tool and language of your choice!\nCheck the **Docs** section for more information.\n\n## Local Development\n\n**Requirements**:\n  - unzip \n  - xmllint\n    * on ubuntu: `apt-get install libxml2-utils`\n    * on alpine: `apk add libxml2-utils`\n  - dotnet-sdk-6.0 - \"The .NET Core SDK\"\n    * on archlinux: the above package also installs `dotnet-runtime`, `dotnet-host` and `dotnet-targeting-pack`) - the .NET Core SDK\n\n### IDE\n\nThis seems to be more or less working in vscode, install the \n\"C# for Visual Studio Code (powered by OmniSharp)\" extension \nand before opening the project in it do `make configure`.\n\n### Commands\n\n  - `make configure` - runs `dotnet restore` which downloads all the required libraries for the projects to work.\n  - `make build` - compiles the *Analyzer* project.\n  - `make build-docs` - compiles the *DocsGenerator* project.\n  - `make build-all` - compiles both the *Analyzer* and *DocsGenerator* projects.\n  - `make documentation` - downloads upstream rules for the *sonar version* we defined in `Analyzer.csproj`,\n    extracts the rules for that version and runs the *DocsGenerator* application.\n\nSee other useful targets inside the `Makefile`.\n\n## Usage\n\n### Publish the docker image locally\n\n```bash\ndocker build -t codacy-sonar-csharp:local .\n```\n\n### Run the docker locally\n\n```bash\ndocker run --user=docker --rm -v \u003cPATH-TO-CODE\u003e:/src:ro -v \u003cPATH-TO\u003e/.codacyrc:/.codacyrc:ro codacy-sonar-csharp:local\n```\n\n### Enter inside the docker image\n\n```bash\ndocker run --user=docker --rm -v \u003cPATH-TO-CODE\u003e:/src:ro -v \u003cPATH-TO\u003e/.codacyrc:/.codacyrc:ro -it --entrypoint /bin/sh codacy-sonar-csharp:local\n```\n\n\u003e Make sure all the volumes mounted have the right permissions for user `docker`\n\n## Tool configuration file\n\nCurrently, to use your own configuration file, you must add a SonarLint.xml xml file with an AnalysisInput structure inside.\n\nExample:\n```\n    \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n    \u003cAnalysisInput\u003e\n      \u003cRules\u003e\n        \u003cRule\u003e\n          \u003cKey\u003eS103\u003c/Key\u003e\n          \u003cParameters\u003e\n            \u003cParameter\u003e\n              \u003cKey\u003emaximumLineLength\u003c/Key\u003e  \n              \u003cValue\u003e24\u003c/Value\u003e  \n            \u003c/Parameter\u003e\n          \u003c/Parameters\u003e\n        \u003c/Rule\u003e\n      \u003c/Rules\u003e\n    \u003c/AnalysisInput\u003e\n```\n\n## Docs\n\n[Tool Developer Guide](https://support.codacy.com/hc/en-us/articles/207994725-Tool-Developer-Guide)\n\n[Tool Developer Guide - Using Scala](https://support.codacy.com/hc/en-us/articles/207280379-Tool-Developer-Guide-Using-Scala)\n\n## Test\n\nWe use the [codacy-plugins-test](https://github.com/codacy/codacy-plugins-test) to test our external tools integration.\nYou can follow the instructions there to make sure your tool is working as expected.\n\n## What is Codacy?\n\n[Codacy](https://www.codacy.com/) is an Automated Code Review Tool that monitors your technical debt, helps you improve your code quality, teaches best practices to your developers, and helps you save time in Code Reviews.\n\n### Among Codacy’s features:\n\n-   Identify new Static Analysis issues\n-   Commit and Pull Request Analysis with GitHub, BitBucket/Stash, GitLab (and also direct git repositories)\n-   Auto-comments on Commits and Pull Requests\n-   Integrations with Slack, HipChat, Jira, YouTrack\n-   Track issues in Code Style, Security, Error Proneness, Performance, Unused Code and other categories\n\nCodacy also helps keep track of Code Coverage, Code Duplication, and Code Complexity.\n\nCodacy supports PHP, Python, Ruby, Java, JavaScript, and Scala, among others.\n\n### Free for Open Source\n\nCodacy is free for Open Source projects.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodacy%2Fcodacy-sonar-csharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodacy%2Fcodacy-sonar-csharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodacy%2Fcodacy-sonar-csharp/lists"}