Skip to content

Commit a3fa13f

Browse files
authored
Merge pull request #101 from cake-contrib/feature/GH-91
(GH-91) added the possibility to check for addin
2 parents b21e6e9 + 5340854 commit a3fa13f

22 files changed

+555
-74
lines changed

docs/input/guidelines/CakeContribIcon.md

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Title: CakeContrib-Icon
1313
- [Settings](#settings)
1414
- [Icon-Location](#icon-location)
1515
- [Icon include in project](#icon-include-in-project)
16-
- [migrating from an existing project](#migrating-from-an-existing-project)
16+
- [Migrating from an existing project](#migrating-from-an-existing-project)
1717

1818
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
1919

@@ -40,36 +40,12 @@ With no special settings at all (i.e. "The Standard"):
4040
## Settings
4141

4242
### Icon-Location
43-
The default location of the icon is `icon.png`, next to the csproj (i.e. `$(MSBuildProjectDirectory)/icon.png`).
44-
45-
Setting `CakeContribGuidelinesIconDestinationLocation` makes it possible to override the default location of the Icon. For example setting
46-
47-
```xml
48-
<PropertyGroup>
49-
<IconDestinationLocation>../logo.png</IconDestinationLocation>
50-
</PropertyGroup>
51-
```
52-
53-
in the csproj will place the icon as `logo.png` one folder up (relative to the current project).
43+
<?! Include "../settings/fragments/IconDestinationLocation.md" /?>
5444

5545
### Icon include in project
56-
The icon will be automatically included in the project, unless `CakeContribGuidelinesIconOmitImport` was defined.
57-
58-
To to use a "custom" import the following could be used:
59-
60-
```xml
61-
<PropertyGroup>
62-
<CakeContribGuidelinesIconOmitImport>1</CakeContribGuidelinesIconOmitImport>
63-
</PropertyGroup>
64-
<ItemGroup>
65-
<None Include="$(CakeContribGuidelinesIconDestinationLocation)">
66-
<Pack>True</Pack>
67-
<PackagePath></PackagePath>
68-
</None>
69-
</ItemGroup>
70-
```
46+
<?! Include "../settings/fragments/IconOmitImport.md" /?>
7147

72-
### migrating from an existing project
48+
## Migrating from an existing project
7349

7450
* remove the existing icon
7551
* remove the `Include` of the icon from the project-file

docs/input/guidelines/PrivateAssets.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,4 @@ Using this package automatically enables this guideline.
3232

3333
### Opt-Out
3434

35-
It it possible to opt-out of the check for `PrivateAssets` using the following setting:
36-
37-
(*Keep in mind, though that it is not recommended to opt-out of this feature*)
38-
39-
```xml
40-
<PropertyGroup>
41-
<CakeContribGuidelinesCakeReferenceOmitPrivateCheck>1</CakeContribGuidelinesCakeReferenceOmitPrivateCheck>
42-
</PropertyGroup>
43-
```
35+
<?! Include "../settings/fragments/OmitPrivateCheck.md" /?>

docs/input/guidelines/RecommendedReferences.md

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,6 @@ Using this package automatically enables this guideline.
3737

3838
### Opt-Out
3939

40-
It it possible to opt-out of the check for StyleCop using the following setting:
41-
42-
(*Keep in mind, though that it is not recommended to opt-out of this feature*)
43-
44-
```xml
45-
<ItemGroup>
46-
<CakeContribGuidelinesOmitRecommendedReference Include="StyleCop.Analyzers" />
47-
</ItemGroup>
48-
```
49-
50-
It is also possible to opt-out of the check for configuration-files (`stylecop.json` as well as `.editorconfig`)
51-
using the following settings:
52-
```xml
53-
<ItemGroup>
54-
<CakeContribGuidelinesOmitRecommendedConfigFile Include="stylecop.json" />
55-
<CakeContribGuidelinesOmitRecommendedConfigFile Include=".editorconfig" />
56-
</ItemGroup>
57-
```
40+
<?! Include "../settings/fragments/OmitRecommendedReference.md" /?>
41+
42+
<?! Include "../settings/fragments/OmitRecommendedConfigFile.md" /?>

docs/input/guidelines/TargetFramework.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,4 @@ Using this package automatically enables this guideline.
4949

5050
### Opt-Out
5151

52-
It it possible to opt-out of the check for target framework using the following setting:
53-
54-
(*Keep in mind, though that it is not recommended to opt-out of this feature*)
55-
56-
```xml
57-
<ItemGroup>
58-
<CakeContribGuidelinesOmitTargetFramework Include="netstandard2.0" />
59-
<CakeContribGuidelinesOmitTargetFramework Include="net461" />
60-
</ItemGroup>
61-
```
52+
<?! Include "../settings/fragments/OmitTargetFramework.md" /?>

docs/input/rules/ccg0004.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ should never be exposed to consuming packages.
3737
## How to fix violations
3838

3939
Add the attribute `PrivateAssets="all"` to all required references.
40-
(Or opt-out of this rule, by setting `CakeContribGuidelinesCakeReferenceOmitPrivateCheck`)
4140

4241
## Related guidelines
4342

docs/input/rules/ccg0005.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ Usage of [StyleCop](https://github.com/DotNetAnalyzers/StyleCopAnalyzers) is rec
2828
## How to fix violations
2929

3030
Add a reference to [StyleCop](https://github.com/DotNetAnalyzers/StyleCopAnalyzers).
31-
(Or opt-out of this rule, by setting `CakeContribGuidelinesOmitRecommendedReference`)
3231

3332
## Related guidelines
3433

docs/input/rules/ccg0006.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ Example-Files can be found at:
3434
* [`stylecop.json`](../guidelines/examples/StyleCopJson)
3535
* [`.editorconfig`](../guidelines/examples/Editorconfig)
3636

37-
(Or opt-out of this rule, by setting `CakeContribGuidelinesOmitRecommendedConfigFile`)
38-
3937
## Related guidelines
4038

4139
* [Recommended References](../guidelines/RecommendedReferences)

docs/input/rules/ccg0007.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ Add the recommended target(s) to the project (example for an addin referencing C
3636
</PropertyGroup>
3737
```
3838

39-
(Or opt-out of this rule, by setting `CakeContribGuidelinesOmitTargetFramework`)
40-
4139
## Related guidelines
4240

4341
* [Target Frameworks](../guidelines/TargetFramework)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
2+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
3+
4+
5+
6+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
7+
8+
The default location of the cake-contrib icon is `icon.png`, next to the csproj (i.e. `$(MSBuildProjectDirectory)/icon.png`).
9+
10+
Setting `CakeContribGuidelinesIconDestinationLocation` makes it possible to override the default location of the Icon. For example setting
11+
12+
```xml
13+
<PropertyGroup>
14+
<CakeContribGuidelinesIconDestinationLocation>../logo.png</CakeContribGuidelinesIconDestinationLocation>
15+
</PropertyGroup>
16+
```
17+
18+
in the csproj will place the icon as `logo.png` one folder up (relative to the current project).
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
2+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
3+
4+
5+
6+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
7+
8+
The cake-contrib icon will be automatically included in the project, unless `CakeContribGuidelinesIconOmitImport` was defined.
9+
10+
To to use a "custom" import the following could be used:
11+
12+
```xml
13+
<PropertyGroup>
14+
<CakeContribGuidelinesIconOmitImport>1</CakeContribGuidelinesIconOmitImport>
15+
</PropertyGroup>
16+
<ItemGroup>
17+
<None Include="$(CakeContribGuidelinesIconDestinationLocation)">
18+
<Pack>True</Pack>
19+
<PackagePath></PackagePath>
20+
</None>
21+
</ItemGroup>
22+
```

0 commit comments

Comments
 (0)