Skip to content

Commit f50419d

Browse files
authored
Merge pull request #53 from cake-contrib/release/0.5.0
Release/0.5.0
2 parents a5549e2 + 610f8a7 commit f50419d

22 files changed

+712
-27
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Run dependabot for cake
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
# run everyday at 6
6+
- cron: '0 6 * * *'
7+
8+
jobs:
9+
dependabot-cake:
10+
runs-on: ubuntu-latest # linux, because this is a docker-action
11+
steps:
12+
- name: check/update cake dependencies
13+
uses: nils-org/dependabot-cake-action@v1

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,6 @@ docs/input/tasks/*
5050

5151
# Wyam related
5252
config.wyam.*
53+
54+
# JetBrains Rider
55+
.idea/

docs/input/guidelines/Analysers.md renamed to docs/input/guidelines/RecommendedReferences.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ To have consistency in code-style among the different tools/plugins the use of A
2121

2222
Example-Files can be found at:
2323

24-
* [`stylecop.json`](./examples/StyleCopJson.md)
25-
* [`.editorconfig`](./examples/Editorconfig.md)
24+
* [`stylecop.json`](./examples/StyleCopJson)
25+
* [`.editorconfig`](./examples/Editorconfig)
2626

2727
## Related rules
2828

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
Order: 4
3+
Title: Target Frameworks
4+
---
5+
6+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
7+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
8+
## Table of Contents
9+
10+
- [Goals](#goals)
11+
- [Required / Suggested versions](#required--suggested-versions)
12+
- [Related rules](#related-rules)
13+
- [Usage](#usage)
14+
- [Settings](#settings)
15+
- [Opt-Out](#opt-out)
16+
17+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
18+
19+
## Goals
20+
21+
As .NET Framework < 4.7.2 has issues with running .NET Standard assemblies, and Cake itself can run on .NET Framework 4.6.1 it is suggested to multi-target addins to `netstandard2.0` and `net461` to have the maximum compatibility.
22+
23+
### Required / Suggested versions
24+
25+
Depending on the referenced `Cake.Core`-version different target versions are required and/or suggested.
26+
Missing a required target version will raise [CCG0007](../rules/ccg0007) as an error
27+
while missing a suggested target version will raise [CCG0007](../rules/ccg0007) as a warning.
28+
29+
* Cake.Core <= 0.33.0
30+
* Required: `netstandard2.0`
31+
* Suggested: `net461`
32+
* alternative: `net46`
33+
34+
## Related rules
35+
36+
* [CCG0007](../rules/ccg0007)
37+
38+
## Usage
39+
40+
Using this package automatically enables this guideline.
41+
42+
## Settings
43+
44+
### Opt-Out
45+
46+
It it possible to opt-out of the check for target framework using the following setting:
47+
48+
(*Keep in mind, though that it is not recommended to opt-out of this feature*)
49+
50+
```xml
51+
<ItemGroup>
52+
<CakeContribGuidelinesOmitTargetFramework Include="netstandard2.0" />
53+
<CakeContribGuidelinesOmitTargetFramework Include="net461" />
54+
</ItemGroup>
55+
```

docs/input/rules/ccg0006.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Title: CCG0006
44
Description: Missing recommended configuraion-file
55
---
66

7-
> No reference to `.editorconfig` found. Usage of `.editorconfig` is strongly recommended.
7+
> No reference to `[fileName]` found. Usage of `[fileName]` is strongly recommended.
88
99
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
1010
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
@@ -23,20 +23,19 @@ This warning is raised, when a recommended configuration-file (i.e. `stylecop.js
2323

2424
## Description
2525

26-
Code-Formatting and layout should be properly configured. This is done using
27-
blah and blah.
26+
Code-Formatting and layout should be properly configured. This is done using `.editorconfig` and `stylecop.json`.
2827

2928
## How to fix violations
3029

31-
Add a balh and blah to the project.
30+
Add the required files to the project.
3231

3332
Example-Files can be found at:
3433

35-
* [`stylecop.json`](../guidelines/examples/StyleCopJson.md)
36-
* [`.editorconfig`](../guidelines/examples/Editorconfig.md)
34+
* [`stylecop.json`](../guidelines/examples/StyleCopJson)
35+
* [`.editorconfig`](../guidelines/examples/Editorconfig)
3736

3837
(Or opt-out of this rule, by setting `CakeContribGuidelinesOmitRecommendedConfigFile`)
3938

4039
## Related guidelines
4140

42-
* [Usage of Analysers](../guidelines/Analysers)
41+
* [Recommended References](../guidelines/RecommendedReferences)

docs/input/rules/ccg0007.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
Order: 7
3+
Title: CCG0007
4+
Description: Missing recommended target
5+
---
6+
7+
> Missing required target: netstandard2.0
8+
9+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
10+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
11+
## Table of Contents
12+
13+
- [Cause](#cause)
14+
- [Description](#description)
15+
- [How to fix violations](#how-to-fix-violations)
16+
- [Related guidelines](#related-guidelines)
17+
18+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
19+
20+
## Cause
21+
22+
This warning is raised, when the addin is not targeted to a recommended target version.
23+
Also, This could be raised as an error, if a required target version is not set.
24+
25+
## Description
26+
27+
Addins should be multi-targeted to `netstandard2.0` and `net461` to have the maximum compatibility.
28+
29+
## How to fix violations
30+
31+
Add the recommended target(s) to the project:
32+
33+
```xml
34+
<PropertyGroup>
35+
<TargetFrameworks>netstandard2.0;net472</TargetFrameworks>
36+
</PropertyGroup>
37+
```
38+
39+
(Or opt-out of this rule, by setting `CakeContribGuidelinesOmitTargetFramework`)
40+
41+
## Related guidelines
42+
43+
* [Target Frameworks](../guidelines/TargetFramework)

recipe.cake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#load nuget:?package=Cake.Recipe&version=2.0.0
1+
#load nuget:?package=Cake.Recipe&version=2.0.1
22

33
Environment.SetVariableNames();
44

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
2+
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_WITHIN_SINGLE_LINE_ARRAY_INITIALIZER_BRACES/@EntryValue">True</s:Boolean>
3+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
4+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
5+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean>
6+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

src/Guidelines/build/CakeContrib.Guidelines.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@
99
<Import Project="$(MSBuildThisFileDirectory)PrivateAssets.targets" />
1010
<Import Project="$(MSBuildThisFileDirectory)RequiredReferences.targets" />
1111
<Import Project="$(MSBuildThisFileDirectory)RequiredFiles.targets" />
12+
<Import Project="$(MSBuildThisFileDirectory)TargetFrameworkVersions.targets" />
1213
</Project>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
4+
<UsingTask
5+
TaskName="$(CakeContribGuidelinesCustomTasksNamespace).TargetFrameworkVersions"
6+
AssemblyFile="$(CakeContribGuidelinesCustomTasksAssembly)" />
7+
8+
<Target
9+
Name="_CheckTargetFrameworkVersions"
10+
AfterTargets="BeforeBuild"
11+
BeforeTargets="CoreBuild">
12+
<!-- All other rules have some "configuration" here, this rules required/suggested targets are hard-coded in the task. Sadly. -->
13+
14+
<TargetFrameworkVersions
15+
References="@(Reference)"
16+
TargetFramework="$(TargetFramework)"
17+
TargetFrameworks="$(TargetFrameworks)"
18+
Omitted="@(CakeContribGuidelinesOmitTargetFramework)"
19+
ProjectFile="$(MSBuildProjectFullPath)" />
20+
</Target>
21+
</Project>

0 commit comments

Comments
 (0)