GithubHelp home page GithubHelp logo

pkdevboxy / codecontracts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from microsoft/codecontracts

0.0 2.0 0.0 256.94 MB

Source code for the CodeContracts tools for .NET

License: Other

C++ 0.92% C 0.42% C# 97.80% JavaScript 0.01% ASP 0.01% HTML 0.01% Python 0.01% Perl 0.02% Visual Basic 0.45% Batchfile 0.05% TeX 0.11% Makefile 0.02% XSLT 0.19% PostScript 0.01% PowerShell 0.01% F# 0.01%

codecontracts's Introduction

CodeContracts

Join the chat at https://gitter.im/Microsoft/CodeContracts

Source code for the CodeContracts tools for .NET

Code Contracts provide a language-agnostic way to express coding assumptions in .NET programs.

The contracts take the form of pre-conditions, post-conditions, and object invariants. Contracts act as checked documentation of your external and internal APIs. The contracts are used to improve testing via runtime checking, enable static contract verification, and documentation generation. Code Contracts bring the advantages of design-by-contract programming to all .NET programming languages. We currently provide three tools:

  1. Runtime Checking. Our binary rewriter modifies a program by injecting the contracts, which are checked as part of program execution. Rewritten programs improve testability: each contract acts as an oracle, giving a test run a pass/fail indication. Automatic testing tools, such as Pex, take advantage of contracts to generate more meaningful unit tests by filtering out meaningless test arguments that don't satisfy the pre-conditions.
  2. Static Checking. Our static checker can decide if there are any contract violations without even running the program! It checks for implicit contracts, such as null dereferences and array bounds, as well as the explicit contracts.
  3. Documentation Generation. Our documentation generator augments existing XML doc files with contract information. There are also new style sheets that can be used with Sandcastle so that the generated documentation pages have contract sections.

Quick Links

Building from source

For working on the project, open CodeContracts.sln and build.

To create the installer and the nuget package, just run buildCC <version>.

We use the convention:

  • CC major version = 1.9.1
  • CC minor version = {month}{day}.{buildInTheDay}

For instance, the 10th build on July 16 would be run as follows:

buildCC 1.9.10716.10

codecontracts's People

Contributors

aarondandy avatar asvishnyakov avatar billings7 avatar codecontractsdotnet avatar danatkinson avatar davidhesselbom avatar fedotovalex avatar francescologozzo avatar gitter-badger avatar hubuk avatar jterry75 avatar micahzoltu avatar mike-barnett avatar ndykman avatar panacekcz avatar sergeyteplyakov avatar sharwell avatar tom-englert avatar wuestholz avatar yaakov-h avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.