Commit graph

16 commits

Author SHA1 Message Date
Brett Logan
fc6c5b34d9
Use Virtual Environment for Python Deps (#2294)
* Build static python depenencies

* Address linting

* Fix copy path

* cleaner

* Stage virtual environments

* Update Dockerfile to support virtual environments

* Remove old python builds

* Remove unnecessary RUN step

* Fix merge conflicts

* Remove test checking for PIP packages

We use virtual environments and no longer install the packages
via pip directly in the image. It should be enough that the version
tests check for the existence already and that the version
comes back correctly.

* Remove binary installation of black

* cleaner

* Remove pip

* pretty

Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>
2022-01-10 15:23:22 -06:00
Marco Ferrari
ee99da290b
Uninstall Dockerfilelint (#2195)
* Uninstall Dockerfilelint

* remove dockerfilelint packages

* trying ca-certs

Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>
2021-12-08 09:53:05 -06:00
Jake Herbst
897185a4aa
Adding scalafmt (#2053)
* Adding scalafmt

* add it

Co-authored-by: Jake Herbst <jherbst@rsglab.com>
Co-authored-by: Lukas Gravley <admiralawkbar@github.com>
2021-11-10 12:28:50 -06:00
Lukas Gravley
81422f3c47
update clang-format (#2007)
* update code

* fixed

* its the v

* hide cache

* it was an org setting lol

* remove from slim

* bump test
2021-09-29 13:12:40 -05:00
guotongfei
1afc7f8409
Enhancement: Add support for google-java-format (#1969)
* Add support for google-java-format

* adding tests and array

* fix comma

* Update linter.sh

* get it in order

* fix hava version

Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>
2021-09-28 17:09:21 -05:00
Lukas Gravley
148622b273
Sqlfluff (#1834)
* adding sqlfluff

* adding sqlfluff

* update test

* adding sql file array
2021-08-05 15:32:27 -05:00
Lukas Gravley
ab24b82199
Adding actionlint (#1775)
* Adding action lint

* adding tests

* adding tests

* Update Dockerfile

Co-authored-by: Masaya Suzuki <15100604+massongit@users.noreply.github.com>

* cleanup name

* fix test

* typo

* fix file name

* fix our own errors

* more cleanup

* angry

* make it happy

* stop double jobs

Co-authored-by: Masaya Suzuki <15100604+massongit@users.noreply.github.com>
2021-07-19 09:28:49 -05:00
Lukas Gravley
1481793072
adding clang (#1762)
* adding clang

* fix hado

* adding files

* fixing naming

* fixing test

* fixing space

* removing config file

* fix tests

* fix tests

* fix file array
2021-07-14 14:43:10 -05:00
Lukas Gravley
d24eb27b4c
move from jsonlint to eslint (#1752)
* move from jsonlint to eslint

* move from jsonlint to eslint

* adding test
2021-07-13 09:10:37 -05:00
Stepan Koltsov
e059100991
Ignore files marked with @generated marker (#1689)
* Ignore files marked with @generated marker

`@generated` marker is used by certain tools to understand that the
file is generated, so it should be treated differently than a file
written by a human:
* these files do not need to be reformatted,
* diffs in these files are less important,
* and linters should not be invoked on these files.

This PR proposes builtin support for `@generated` marker (and
`@not-generated` marker to mark file as not generated when it
contains `@generated` marker, like `README.md`).

I have not found a standard for a generated file marker, but:
* Facebook [uses `@generated` marker](https://tinyurl.com/fb-generated)
* Phabricator tool which was spawned from Facebook internal tool
  [also understands `@generated` marker](https://git.io/JnVHa)
* Cargo inserts `@generated` marker into [generated Cargo.lock files](https://git.io/JnVHP)

Super-linter supports regex includes and excludes, but they are
harder to maintain (each repository needs to be configured) than
patching the tools which generate the files.

My personal story is that I maintain rust-protobuf crate, which
started emitting `@generated` markers [six years ago](https://git.io/JnV5h)
after a request of a Phabricator user.

Test Plan:

Create a test file `test.sh`:

```
echo $a
```

Run:

```
docker run -e RUN_LOCAL=true -v $HOME/tmp/g:/tmp/lint super-linter-test
```

Result is:

```
In /tmp/lint/test.sh line 1:
echo $a
^-- SC2148: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
     ^-- SC2154: a is referenced but not assigned.
     ^-- SC2086: Double quote to prevent globbing and word splitting.
...
2021-06-22 23:46:16 [ERROR]   ERRORS FOUND in BASH:[1]
```

Now add `@generated` to the file and run again:

```
2021-06-22 23:47:13 [NOTICE]   All file(s) linted successfully with no errors detected
```

Additionally, add `@not-generated` in addition to `@generated`, and
linter error pops up again.

* cleanup

* remove space

* fix non utf return

* fix non utf return

Co-authored-by: Lukas Gravley <admiralawkbar@github.com>
2021-06-28 07:59:11 -05:00
Lukas Gravley
83badbc49c
Image 4.0 (#1565)
* adding new one...

* adding automation

* linter

* pull apart for faster builds

* maybe

* update automation

* fix that

* prime is smart

* fixed it

* quotes

* fix build image

* inpec

* typo

* forgot backslash

* fixed hairbrain logic

* this should help cleanup

* i hate r

* order

* maybe fix r

* maybe fix r

* update readme

* remove spaces

* update
2021-05-25 10:14:43 -05:00
Lukas Gravley
3e0bd7fff4
Eslint for json jsonc and json5 (#1524)
* adding it

* fix typo

* fix tests

* adding back jsonlint

* adding back jsonlint

* fix spacing

* found the typo

* add tests

* adding rules for json

* add to local
2021-05-11 10:54:58 -05:00
Lukas Gravley
5d2ea81f00
Cpp (#1492)
* adding cpp

* adding cpp

* tests

* make test better

* fix test
2021-05-04 13:24:41 -05:00
Lukas Gravley
72cbbfc4e5
Inspec additional Tests (#1497)
* adding tests

* adding more

* cleanup vars

* dumb

* dumb

* fix r lib

* adding test

* quotes

* quotes

* more test

* adding brackets

* typos

* dumb

* slashes
2021-05-03 16:30:02 -05:00
Marco Ferrari
0c8db849aa
Implement a test suite with InSpec (#1466)
* Implement a test suite with InSpec

* make ruby happy

* adding file

* Fix inspec and add make target

* Run inspec

* adding binaries

* make ruby happy

* fix linter order

* cleanup

* adding version check

* adding notes

* cleanup

* cleanup

* fixed r test

* fixed copy paste

* dynamic tests

* fix hash

* fix notation

* docker ps

* Fix makefile

* Fix makefile

Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>
2021-04-30 11:29:15 -05:00
Marco Ferrari
527c5a3986
Generate a code coverage report (#1353)
* Generate a code coverage report

* make linters happy

* adding action and badge

* no report for me

* Upload the test report

* adding folders

* spaces not tabs

* makefiles love tabs

* spacing is important

* rawr

* Fix makefile

* Add diagnostic info

* Set UID and GID

* Make info

* Add docker images in diagnostic info

* Move info before testing the local action

* Add missing -C to git diff-tree

* Reset ownership

* Add missing quotes

* Sudo

* Attempt to fix ARM test

* Attempt to fix go test

Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>
2021-04-22 13:56:18 -05:00