Skip to content

Commit 305dbd3

Browse files
authored
Merge pull request #16 from Igorbek/release/1.12
Release 1.12
2 parents 3222cc6 + 87b33a9 commit 305dbd3

3 files changed

Lines changed: 91 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file.
33

44
## [Unreleased]
55

6+
## [1.12] - 2018-02-06
67
## [1.12-rc] - 2018-01-14
78
### Added
89
- Add `.props` file to initialize all contract default settings (#14, thanks to @kkm000)
@@ -43,7 +44,8 @@ All notable changes to this project will be documented in this file.
4344

4445
## 1.7.10908.1101-beta - 2014-10-03
4546

46-
[Unreleased]: https://github.com/igorbek/CodeContracts.MSBuild/compare/v1.12-rc...HEAD
47+
[Unreleased]: https://github.com/igorbek/CodeContracts.MSBuild/compare/v1.12...HEAD
48+
[1.12]: https://github.com/igorbek/CodeContracts.MSBuild/compare/v1.11...v1.12
4749
[1.12-rc]: https://github.com/igorbek/CodeContracts.MSBuild/compare/v1.11...v1.12-rc
4850
[1.11]: https://github.com/igorbek/CodeContracts.MSBuild/compare/v1.10.1...v1.11
4951
[1.11-alpha]: https://github.com/igorbek/CodeContracts.MSBuild/compare/v1.10.1...v1.11-alpha

README.md

Lines changed: 86 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,89 @@
11
CodeContracts.MSBuild
22
=====================
33

4-
Standalone MSBuild integration for CodeContracts (by Microsoft Research)
4+
Standalone MSBuild integration for [Microsoft CodeContracts](https://github.com/microsoft/codecontracts) (by Microsoft Research).
5+
6+
## Installation
7+
8+
Simply add `CodeContracts.MSBuild` nuget to projects that use Code Contracts.
9+
10+
From package manager:
11+
12+
```
13+
Install-Package CodeContracts.MSBuild
14+
```
15+
16+
From .Net CLI:
17+
18+
```
19+
dotnet add package CodeContracts.MSBuild
20+
```
21+
22+
## Settings
23+
24+
### `DontOverrideCodeContractsInstallDir`, `CodeContractsInstallDir`
25+
26+
By default `CodeContracts.MSBuild` uses CodeContracts version that is bundled with this package.
27+
28+
However, if you want to use custom CodeContracts installation,
29+
you can define the following MSBuild properties in your project file:
30+
31+
```xml
32+
<PropertyGroup>
33+
<DontOverrideCodeContractsInstallDir>true<DontOverrideCodeContractsInstallDir>
34+
<CodeContractsInstallDir>your_custom_codecontracts_install_dir\</CodeContractsInstallDir>
35+
</PropertyGroup>
36+
```
37+
38+
### `CodeContracts*`
39+
40+
`CodeContracts.MSBuild` defines a bunch of default properties that are used by Microsoft CodeContracts.
41+
Please refer to CodeContracts for meaning of these options.
42+
43+
| Property | Default value | Description |
44+
|----------|---------------|-------------|
45+
| **Runtime checking** |
46+
| `CodeContractsEnableRuntimeChecking` | `False` | Runtime checking. If `False`, whole section is irrelevant. |
47+
| `CodeContractsAssemblyMode` | `1` | Assembly mode, `1` = standard, `2` = advanced. |
48+
| `CodeContractsRuntimeCheckingLevel` | `Full` | Level: `Full`, `Pre and Post`, `Preconditions`, `ReleaseRequires`, `None` |
49+
| `CodeContractsRuntimeOnlyPublicSurface` | `False` | Only public surface contracts |
50+
| `CodeContractsRuntimeThrowOnFailure` | `False` | Assert on contract failure |
51+
| `CodeContractsRuntimeCallSiteRequires` | `False` | Call-site requires checking | `CodeContractsRuntimeSkipQuantifiers` | `False` | Skip quantifiers |
52+
| `CodeContractsCustomRewriterAssembly` | *empty* | Custom rewriter methods / Assembly |
53+
| `CodeContractsCustomRewriterClass` | *empty* | Custom rewriter methods / Class |
54+
| **Static checking** |
55+
| `CodeContractsRunCodeAnalysis` | `True` | Static checking. If `False`, whole section is irrelevant. |
56+
| `CodeContractsNonNullObligations` | `True` | Check non-null |
57+
| `CodeContractsEnumObligations` | `True` | Check enum values |
58+
| `CodeContractsRedundantAssumptions` | `True` | Check redundant assume |
59+
| `CodeContractsSuggestAssumptions` | `False` | Show entry assumptions |
60+
| `CodeContractsSuggestRequires` | `False` | Suggest requires |
61+
| `CodeContractsAssertsToContractsCheckBox` | `True` | Suggest asserts to contracts |
62+
| `CodeContractsInferRequires` | `True` | Infer requires |
63+
| `CodeContractsInferEnsures` | `False` | Infer ensures |
64+
| `CodeContractsArithmeticObligations` | `True` | Check arithmetic |
65+
| `CodeContractsMissingPublicRequiresAsWarnings` | `True` | Check missing public requires |
66+
| `CodeContractsRedundantTests` | `True` | Check redundant conditionals |
67+
| `CodeContractsSuggestAssumptionsForCallees` | `False`| Show external assumptions |
68+
| `CodeContractsSuggestReadonly` | `True`| Suggest readonly fields |
69+
| `CodeContractsNecessaryEnsures` | `True` | Suggest necessary ensures |
70+
| `CodeContractsInferObjectInvariants` | `False` | Infer invariants for readonly |
71+
| `CodeContractsInferEnsuresAutoProperties` | `True` | Infer ensures for autoproperties |
72+
| `CodeContractsFailBuildOnWarnings` | `False` | Fail build on warnings |
73+
| `CodeContractsBoundsObligations` | `True` | Check array bounds |
74+
| `CodeContractsMissingPublicEnsuresAsWarnings` | `False` | Check missing public ensures |
75+
| `CodeContractsSuggestObjectInvariants` | `False` | Suggest object invariants |
76+
| **Misc**
77+
| `CodeContractsCacheAnalysisResults` | `True` | Cache results |
78+
| `CodeContractsSQLServerOption` | *empty* | SQL Server |
79+
| `CodeContractsSkipAnalysisIfCannotConnectToCache` | `False` | Skip the analysis if cannot connect to cache |
80+
| `CodeContractsAnalysisWarningLevel` | `0` | Warning level: `0`, `1, `2`, `3` |
81+
| `CodeContractsBeingOptimisticOnExternal` | `True` | Be optimistic on external API |
82+
| `CodeContractsUseBaseLine` | `False` | Baseline |
83+
| `CodeContractsBaseLineFile`| *empty* | Baseline file |
84+
| `CodeContractsReferenceAssembly` | `Build` | Contract reference assembly |
85+
| `CodeContractsEmitXMLDocs` | `False` | Emit contracts into XML doc file |
86+
| **Advanced options** |
87+
| `CodeContractsLibPaths` | *empty* | Extra contract library paths |
88+
| `CodeContractsExtraRewriteOptions` | *empty* | Extra runtime checker options |
89+
| `CodeContractsExtraAnalysisOptions` | *empty* | Extra static checker options |

nuget/CodeContracts.MSBuild/CodeContracts.MSBuild.nuspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
33
<metadata>
44
<id>CodeContracts.MSBuild</id>
5-
<version>1.12.0-rc</version>
5+
<version>1.12.0</version>
66
<developmentDependency>true</developmentDependency>
77
<title>Microsoft Code Contracts standalone package for MSBuild</title>
88
<authors>Igor Oleinikov</authors>
99
<projectUrl>https://github.com/Igorbek/CodeContracts.MSBuild</projectUrl>
1010
<requireLicenseAcceptance>false</requireLicenseAcceptance>
1111
<description>Helper package to use with build servers. Contains all CodeContracts binaries and integrates into MSBuild build process.</description>
1212
<releaseNotes>Full changelog: https://github.com/Igorbek/CodeContracts.MSBuild/blob/master/CHANGELOG.md
13-
1.12-rc:
13+
1.12:
1414
- Add .props file to initialize all contract default settings
1515
- Marked package with developmentDependency
1616
1.11:

0 commit comments

Comments
 (0)