Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
brichbash committed Jan 19, 2024
0 parents commit 2dd4a5a
Show file tree
Hide file tree
Showing 8 changed files with 136 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Qodana
on:
workflow_dispatch:
pull_request:
push:

jobs:
qodana:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
checks: write
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: 'Qodana Scan'
uses: JetBrains/qodana-action@main
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
QODANA_NUGET_URL: ${{ secrets.QODANA_NUGET_URL }}
QODANA_NUGET_USER: ${{ secrets.QODANA_NUGET_USER }}
QODANA_NUGET_PASSWORD: ${{ secrets.QODANA_NUGET_PASSWORD }}
with:
upload-result: true
36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
*.swp
*.*~
project.lock.json
.DS_Store
*.pyc
nupkg/

.vscode/

.idea/

.vs/

.fleet/

.cr/

*.suo
*.user
*.userosscache
*.sln.docstates

[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bld/
[Bb]in/
[Oo]bj/
[Oo]ut/
msbuild.log
msbuild.err
msbuild.wrn
16 changes: 16 additions & 0 deletions QodanaPrivateFeed.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QodanaPrivateFeed", "QodanaPrivateFeed\QodanaPrivateFeed.csproj", "{C96473E7-B190-4ED9-8A28-9B235AFF68C1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C96473E7-B190-4ED9-8A28-9B235AFF68C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C96473E7-B190-4ED9-8A28-9B235AFF68C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C96473E7-B190-4ED9-8A28-9B235AFF68C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C96473E7-B190-4ED9-8A28-9B235AFF68C1}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
9 changes: 9 additions & 0 deletions QodanaPrivateFeed/FooBar.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace QodanaPrivateFeed;
using PrivatePackage;
public class FooBar
{
public static void UsePackage()
{
Class1.Foo();
}
}
13 changes: 13 additions & 0 deletions QodanaPrivateFeed/QodanaPrivateFeed.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="PrivatePackage" Version="1.0.0" />
</ItemGroup>

</Project>
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Example of using Qodana for .NET with private NuGet feed

To use private NuGet feeds in Qodana for .NET, you can add the following environmental variables to your job:
* `QODANA_NUGET_URL=URL` - your NuGet feed url, e.g. `https://nuget.pkg.github.com/brichbash/index.json`
* `QODANA_NUGET_USER=LOGIN`
* `QODANA_NUGET_PASSWORD=PASSWORD`

See the example configuration for GitHub Actions in `./.github/workflows/code-quality.yml`
22 changes: 22 additions & 0 deletions bitbucket-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
image: atlassian/default-image:4

pipelines:
branches:
main:
- step:
name: Qodana
caches:
- qodana
image: jetbrains/qodana-dotnet:latest
script:
- export QODANA_TOKEN=$QODANA_TOKEN
- export QODANA_NUGET_URL=$QODANA_NUGET_URL
- export QODANA_NUGET_PASSWORD=$QODANA_NUGET_PASSWORD
- export QODANA_NUGET_USER=$QODANA_NUGET_USER
- qodana --results-dir=$BITBUCKET_CLONE_DIR/.qodana --report-dir=$BITBUCKET_CLONE_DIR/.qodana/report --cache-dir=$BITBUCKET_CLONE_DIR/.qodana/cache
artifacts:
- .qodana/report

definitions:
caches:
qodana: .qodana/cache
4 changes: 4 additions & 0 deletions qodana.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
version: 1.0
linter: jetbrains/qodana-dotnet:latest
dotnet:
project: QodanaPrivateFeed.csproj

0 comments on commit 2dd4a5a

Please sign in to comment.