Skip to content

Commit

Permalink
cloc, eslint-plugin-check-file
Browse files Browse the repository at this point in the history
  • Loading branch information
milesstoetzner authored Aug 15, 2023
1 parent f5f1286 commit 4fc978e
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 6 deletions.
19 changes: 17 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"plugins": ["@typescript-eslint", "check-file"],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"],
"rules": {
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/ban-ts-comment": "off"
"@typescript-eslint/ban-ts-comment": "off",
"check-file/filename-naming-convention": [
"error",
{
"**/*": "KEBAB_CASE"
},
{
"ignoreMiddleExtensions": true
}
],
"check-file/folder-naming-convention": [
"error",
{
"**/*/": "KEBAB_CASE"
}
]
}
}
2 changes: 1 addition & 1 deletion docs/cmds/query/generate.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as files from '#files'
import * as path from 'path'
import {loadAllTests} from '../../../tests/query/QueryTest'
import {loadAllTests} from '../../../tests/query/query-test'

async function main() {
const documentationDirectory = path.join('docs', 'docs', 'queries4tosca', 'tests')
Expand Down
29 changes: 29 additions & 0 deletions docs/docs/contributing/notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,35 @@ If they can not be parsed, they are treated as string.

These environment variables should be used with caution.

## Lines of Code

Run the following command, to count the lines of code in the `src` folder.

```text linenums="1"
yarn loc
```

The following output has been generated on the `main` branch on August 14, 2023.

```text linenums="1"
158 text files.
155 unique files.
3 files ignored.
github.com/AlDanial/cloc v 1.96 T=0.12 s (1288.2 files/s, 83591.5 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
TypeScript 127 1420 710 7567
Bourne Shell 15 45 14 144
YAML 7 11 0 105
EJS 5 7 0 34
CSV 1 0 0 1
-------------------------------------------------------------------------------
SUM: 155 1483 724 7851
-------------------------------------------------------------------------------
```

## Limitations

In the following, we briefly discuss limitations of our prototypical implementation.
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@
"@typescript-eslint/parser": "^5.58.0",
"chai": "^4.3.7",
"chai-datetime": "^1.8.0",
"cloc": "^1.96.0-cloc",
"cross-env": "^7.0.3",
"dotenv": "^16.0.3",
"eslint": "^8.38.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-check-file": "^2.6.2",
"eslint-plugin-import": "^2.27.5",
"license-checker": "^25.0.1",
"mocha": "^10.2.0",
Expand Down Expand Up @@ -134,6 +136,7 @@
"puccini:check:single": "bash docs/cmds/puccini/check.sh",
"puml:up": "cd docs && docker-compose up -d",
"puml:down": "cd docs && docker-compose down",
"large:check": "bash cmds/check-large-files.sh"
"large:check": "bash cmds/check-large-files.sh",
"loc": "cloc src"
}
}
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/query/query.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {loadAllTests} from './QueryTest'
import {loadAllTests} from './query-test'

describe('queries', async () => {
try {
Expand Down
15 changes: 14 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1232,6 +1232,11 @@ cliui@^7.0.2:
strip-ansi "^6.0.0"
wrap-ansi "^7.0.0"

cloc@^1.96.0-cloc:
version "1.96.0-cloc"
resolved "https://registry.yarnpkg.com/cloc/-/cloc-1.96.0-cloc.tgz#ad58064269215c89400b5fc42cb4ce5e0bf35e60"
integrity sha512-J2EpxfpAomElDXH1a0WXmpONNBUnz3VR0blNzAuHGSn2cWgKLHKJCWlfhZnjklsW30SHoaagKsNeeAz/Mfo82w==

color-convert@^1.9.0:
version "1.9.3"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
Expand Down Expand Up @@ -1739,6 +1744,14 @@ eslint-module-utils@^2.7.4:
dependencies:
debug "^3.2.7"

eslint-plugin-check-file@^2.6.2:
version "2.6.2"
resolved "https://registry.yarnpkg.com/eslint-plugin-check-file/-/eslint-plugin-check-file-2.6.2.tgz#2e60d567ce7d087727d19c7e7b5b9def1e5b693e"
integrity sha512-z3Rur4JjOdNH0fia1IH7JQseo9NLuFVtw9j8P6z2c5XmXWemH7/qGpmMB8XbOt9bJBNpmPlNAGJty9b3EervPw==
dependencies:
is-glob "^4.0.3"
micromatch "^4.0.5"

eslint-plugin-import@^2.27.5:
version "2.27.5"
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz#876a6d03f52608a3e5bb439c2550588e51dd6c65"
Expand Down Expand Up @@ -3209,7 +3222,7 @@ methods@~1.1.2:
resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==

micromatch@^4.0.2, micromatch@^4.0.4:
micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.5:
version "4.0.5"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6"
integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==
Expand Down

0 comments on commit 4fc978e

Please sign in to comment.