In the development of platform components Flexberry team must adhere to a single coding style.

To understand infrastructure requirements applications are encouraged to consult the book Infrastructure software projects. Agreement, idioms, and patterns for reusable libraries .NET ( CD-ROM).

JavaScript

JavaScript Open Source projects platform Flexberry has adopted a set of agreements which was published on the GitHub page. There is also a separate agreement in writing comments in your code EmberJS projects.

CSharp

It is recommended to read the book Infrastructure software projects: conventions, idioms and patterns for reusable libraries .NET, which describes best practices, including coding and architectural highlights. In .NET Open Source projects platform Flexberry set of agreements is realized through the mechanism of “rule Sets” which is present in Microsoft Visual Studio by following the above tips IDE allows you to develop applications with clear and understandable program code.

Static code analyzers

StyleCop

StyleCop is a static analyzer C# code for compliance with the style.

Setting:

  1. Install NuGet package StyleCop.Analyzers
  2. In the project properties, in the tab Code Analysis to select rules in the drop-down list Run this rule set.

Code style

List of rules, which are used in the projects of the platform Flexberry can be found on GitHub-e.

JSLint

JSLint is a static code analyzer for programs written in JavaScript that checks their compliance to coding standards.

Setting:

  1. Install npm package ember-cli-eslint
  2. At the root of the project create and configure file .eslintrc.js, an example implementation is contained in the draft ember-flexberry.
  3. In project root create a file .eslintignore - need to add the files and the directory should not be checked JSLint-Ohm. An example implementation is contained in the draft ember-flexberry.

More information can be found on the official website JSLint

JSHint

JSHint is a static code analysis tool used in software development to check compliance with source code JavaScript coding guidelines.

Setting:

  1. Install npm package jshint in ember applications this package installs as dependencies when installing ember-cli-qunit.
  2. At the root of the project create and configure file .jshintrc, an example implementation is contained in the project ember-flexberry.
Переведено сервисом «Яндекс.Переводчик» http://translate.yandex.ru