From fe4edae25fa041ad556f499461b72acd138b7683 Mon Sep 17 00:00:00 2001 From: Luis Blanco Date: Tue, 10 Oct 2023 22:00:42 +0400 Subject: [PATCH] Add cpplint --- .github/workflows/cpplint.yml | 46 +++++++++++++++++++++++++++++++++++ package-lock.json | 19 ++++++++++----- package.json | 7 +++--- src/CPPLINT.cfg | 17 ------------- 4 files changed, 63 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/cpplint.yml delete mode 100644 src/CPPLINT.cfg diff --git a/.github/workflows/cpplint.yml b/.github/workflows/cpplint.yml new file mode 100644 index 0000000..fe42ea7 --- /dev/null +++ b/.github/workflows/cpplint.yml @@ -0,0 +1,46 @@ +name: Cpplint +defaults: + run: + shell: bash + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + eslint: + name: Cpplint + runs-on: ubuntu-20.04 + + steps: + + - name: Fetch Repository + uses: actions/checkout@v3 + with: + persist-credentials: false + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 18.16.0 + cache: 'npm' + + - name: Install Modules + run: npm ci + + - name: Install Python + uses: actions/setup-python@v4 + with: + python-version: '3.12' + + - name: Install Cpplint + run: pip install cpplint + + - name: Run Cpplint + run: | + node -e "require('addon-tools-raub').cpcpplint()" + cpplint --recursive ./src/cpp diff --git a/package-lock.json b/package-lock.json index 60e52f3..27c7977 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,20 +1,21 @@ { "name": "webgl-raub", - "version": "4.0.1", + "version": "4.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "webgl-raub", - "version": "4.0.1", + "version": "4.0.2", "hasInstallScript": true, "license": "MIT", "dependencies": { - "addon-tools-raub": "^7.3.0", + "addon-tools-raub": "^7.4.0", "deps-opengl-raub": "^5.1.1", "segfault-raub": "^2.1.2" }, "devDependencies": { + "@types/node": "^20.8.3", "eslint": "^8.51.0", "eslint-plugin-node": "^11.1.0", "node-addon-api": "^7.0.0", @@ -158,6 +159,12 @@ "node": ">= 8" } }, + "node_modules/@types/node": { + "version": "20.8.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.3.tgz", + "integrity": "sha512-jxiZQFpb+NlH5kjW49vXxvxTjeeqlbsnTAdBTKpzEdPs9itay7MscYXz3Fo9VYFEsfQ6LJFitHad3faerLAjCw==", + "dev": true + }, "node_modules/acorn": { "version": "8.10.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", @@ -180,9 +187,9 @@ } }, "node_modules/addon-tools-raub": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/addon-tools-raub/-/addon-tools-raub-7.3.0.tgz", - "integrity": "sha512-IfjMGgJ6RLD12+igg7tV9hhOCWQvK00csf9CiZa+BorBp/8FgwCi42DtAONBsRbX/LUD8+2RbwtfBOeTDYXLZA==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/addon-tools-raub/-/addon-tools-raub-7.4.0.tgz", + "integrity": "sha512-KOYJFeeI/EntAcho4/h7dDWNd1jV1atod6xEwcfmArifKga6tR2Nd9eEBCx3E6Ju6sTEpoaMNg3WBB9AFJPhxg==", "engines": { "node": ">=18.16.0", "npm": ">=9.5.1" diff --git a/package.json b/package.json index 190e9fe..2f0467a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "author": "Luis Blanco ", "name": "webgl-raub", - "version": "4.0.1", + "version": "4.0.2", "description": "WebGL for Node.js", "license": "MIT", "main": "index.js", @@ -44,13 +44,14 @@ "url": "https://github.com/node-3d/webgl-raub.git" }, "dependencies": { - "addon-tools-raub": "^7.3.0", + "addon-tools-raub": "^7.4.0", "deps-opengl-raub": "^5.1.1", "segfault-raub": "^2.1.2" }, "devDependencies": { - "eslint-plugin-node": "^11.1.0", + "@types/node": "^20.8.3", "eslint": "^8.51.0", + "eslint-plugin-node": "^11.1.0", "node-addon-api": "^7.0.0", "typescript": "^5.2.2" } diff --git a/src/CPPLINT.cfg b/src/CPPLINT.cfg deleted file mode 100644 index 002e85b..0000000 --- a/src/CPPLINT.cfg +++ /dev/null @@ -1,17 +0,0 @@ -set noparent -linelength=110 -filter=-legal/copyright -filter=-build/include_order -filter=-build/include -filter=-build/header_guard -filter=-build/namespaces -filter=-build/include_what_you_use -filter=-whitespace/blank_line -filter=-whitespace/comments -filter=-whitespace/tab -filter=-whitespace/end_of_line -filter=-whitespace/indent -filter=-whitespace/operators -filter=-whitespace/parens -filter=-readability/todo -filter=-runtime/indentation_namespace