cc

2019-03-15 admin

cc是什么

什么是cc,Code style linter for C++ source files used in Node.js native addons

cc使用教程帮助文档

cc

Code style linter for C++ source files used in Node.js native addons.

Follows the Google C++ Style Guide.

As standard, semistandard and xo are to your JavaScript source files, cc is to your C++ source files.

Install

npm install cc --save-dev

Usage

Add cc to the test script of your project’s package.json file.

The following example uses xo for linting JavaScript, cc for linting C++ and ava for unit tests.

{
  "name": "awesome-native-package",
  "scripts": {
    "test": "xo && cc && ava"
  },
  "devDependencies": {
    "ava": "^0.18.0",
    "cc": "^1.0.0",
    "xo": "^0.17.0"
  }
}

Defaults

"cc": {
  "linelength": "80",
  "files": [
    "**/*.cc",
    "**/*.h"
  ],
  "ignore": [
    "node_modules/**",
    "vendor/**"
  ],
  "filter": []
}

Files listed in .gitignore or contained within any “dot” directories (e.g. .git) are also ignored.

Example

Allow a line length of 120 characters and ignore all include checks:

{
  "name": "awesome-native-package",
  "scripts": {
    "test": "cc"
  },
  "devDependencies": {
    "cc": "^1.0.0"
  },
  "cc": {
    "linelength": "120",
    "filter": [
      "build/include"
    ]
  }
}

Thanks

Licence

Copyright 2017 Lovell Fuller.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-57761.html

文章标题:cc

相关文章
在blueimp文件上传文件的最大尺寸和acceptfiletypes不工作。为什么?
rae1YoBre提出了一个问题:maxFileSize and acceptFileTypes in blueimp file upload plugin do not work. Why?,或许与您遇到的问题类似。 回答者PaulMrG...
2018-03-20
verdaccio
verdaccio是什么 什么是verdaccio,Private npm repository server verdaccio官网:官网 verdaccio源码仓库:源码仓库 verdaccio下载地址:点此下载 点此下载2 ver...
2018-10-13
Storage Access API 介绍
2018.2.21 作者:John Wilander @johnwilander 去年6月,我们推出了 Intelligent Tracking Prevention(ITP)(智能防跟踪)。ITP 是一项隐私功能,可以检测可以跨站追踪用户...
2018-04-29
Angular ui-router - how to access parameters in nested, named view, passed from the parent template?
hzane提出了一个问题:Angular ui-router - how to access parameters in nested, named view, passed from the parent template?,或许与您遇到...
2018-04-08
fs-access
fs-access是什么 什么是fs-access,Node.js 0.12 fs.access() & fs.accessSync() ponyfill fs-access官网:官网 fs-access源码仓库:源码仓库 fs-...
2018-09-16
Tocca.js
Tocca.js是什么 什么是Tocca.js,Super lightweight script (1kb) to detect via Javascript events like 'tap' 'dbltap' 'swipeup' 'sw...
2018-07-18
accounting.js
accounting.js是什么 什么是accounting.js,A lightweight JavaScript library for number, money and currency formatting . accounti...
2018-08-27
vue如何通过NodeJs本地获取微信access_token及签名,并调用微信接口
一直都想搞一下微信公众号网页开发,公司忙没有时间自己也没开发过所以也没有头绪,前两天通过自己的摸索以及自行查找的资料,终于通过nodejs在本地成功的获取到了微信的access_token及签名,以及调用微信的接口.因为笔者自己在做的时候费...
2018-09-21
access-control
access-control是什么 什么是access-control,Easily handle HTTP Access Control (CORS) in your applications access-control官网:官网 a...
2019-02-12
[官方][英] Safari Webkit - 支持新的 Storage Access API
In June last year we introduced Intelligent Tracking Prevention (ITP). ITP is a privacy feature that detects which domai...
2018-02-22
回到顶部