Skip to content

Commit

Permalink
Merge pull request #28 from DanRigby/qodana
Browse files Browse the repository at this point in the history
Setup Qodana code analysis
  • Loading branch information
DanRigby authored Jul 13, 2023
2 parents fb29e42 + 1387aeb commit 4f8f2d2
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 41 deletions.
18 changes: 0 additions & 18 deletions .config/dotnet-tools.json

This file was deleted.

20 changes: 4 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,13 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Setup DotNet 6.0
uses: actions/setup-dotnet@v2
- name: Setup DotNet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'

- name: Restore Tools
run: dotnet tool restore

- name: Restore Dependencies
run: dotnet restore
dotnet-version: '7.x'

- name: Build Project
run: dotnet build --no-restore
run: dotnet build

- name: Run Tests
run: dotnet test --no-build --verbosity normal

- name: Run InspectCode
run: dotnet jb inspectcode --no-build --swea --severity=SUGGESTION --output=inspectcode.xml *.sln

- name: Run NVika
run: dotnet nvika parsereport "inspectcode.xml"
23 changes: 23 additions & 0 deletions .github/workflows/qodana.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Qodana

on:
workflow_dispatch:
pull_request:
push:
branches: [ main ]

jobs:
qodana:
runs-on: ubuntu-latest
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 }}
- uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json
2 changes: 1 addition & 1 deletion JsonFeedNet.Tests/JsonFeedNet.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down
6 changes: 3 additions & 3 deletions JsonFeedNet/JsonFeedNet.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netcoreapp3.1;net6.0;net7.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<AnalysisMode>Recommended</AnalysisMode>
Expand All @@ -11,14 +11,14 @@
<Product>JsonFeedNet</Product>
<Description>Portable .NET library for generating and consuming JSON Feed (jsonfeed.org) compliant feeds.</Description>
<Copyright>Copyright 2022</Copyright>
<Version>1.1.0.0</Version>
<Version>1.2.0.0</Version>
<Authors>Dan Rigby, RouR</Authors>
<PackageId>JsonFeed.NET</PackageId>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/DanRigby/JsonFeed.Net</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageReleaseNotes>
Implemented 1.1 spec of JsonFeed.
Added .NET7.0 target and removed .NET5.0 target.
</PackageReleaseNotes>
<PackageTags>jsonfeed jsonfeed.net jsonfeed.org</PackageTags>
<IncludeSymbols>true</IncludeSymbols>
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Dan Rigby
Copyright (c) 2023 Dan Rigby

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ JsonFeed.NET

JsonFeed.NET is a portable .NET library for generating and consuming [JSON Feed](https://jsonfeed.org/) compliant site feeds.

[![build](https://img.shields.io/github/workflow/status/DanRigby/JsonFeed.NET/build)](https://github.com/DanRigby/JsonFeed.NET/actions/workflows/build.yml) [![NuGet Pre Release](https://img.shields.io/nuget/vpre/JsonFeed.NET.svg)](https://www.nuget.org/packages/JsonFeed.NET) [![Twitter Follow](https://img.shields.io/twitter/follow/DanRigby.svg)](https://twitter.com/DanRigby)
[![Build](https://github.com/DanRigby/JsonFeed.NET/actions/workflows/build.yml/badge.svg)](https://github.com/DanRigby/JsonFeed.NET/actions/workflows/build.yml) [![Qodana](https://github.com/DanRigby/JsonFeed.NET/actions/workflows/qodana.yml/badge.svg)](https://github.com/DanRigby/JsonFeed.NET/actions/workflows/qodana.yml) [![NuGet Pre Release](https://img.shields.io/nuget/vpre/JsonFeed.NET.svg)](https://www.nuget.org/packages/JsonFeed.NET) [![Twitter Follow](https://img.shields.io/twitter/follow/DanRigby.svg)](https://twitter.com/DanRigby)

#### Supported platforms
* .NET Framework 4.5.1+
Expand Down Expand Up @@ -75,6 +75,6 @@ jsonFeed.Write(stream);

## License

Copyright (c) 2022 Dan Rigby
Copyright (c) 2023 Dan Rigby

Licensed under the [MIT license](https://github.com/DanRigby/JsonFeed.Net/blob/master/LICENSE).

0 comments on commit 4f8f2d2

Please sign in to comment.