Angus Lees
e33730a31e
Fix jsonnet-lint bazel build
...
Update BUILD.bazel files so `bazel build //cmd/jsonnet-lint` works
again.
2022-10-26 13:02:57 +01:00
jaymebrd
635d04f264
feat: add support linter std get ( #627 )
...
* feat: add missing linter metadata for std.get
* feat: add tests cases for std.get linter with default and optional parameters
2022-10-19 06:19:49 +01:00
Jayme Bird
a5ddc1c5a4
feat: add support to the jsonnet linter for std.manifestJsonMinified
2022-08-18 22:23:43 +01:00
Jayme Bird
f0a060e259
feat: Add missing linter metadata for std.manifestTomlEx function
2022-03-18 02:05:38 +00:00
Angus Lees
f699b0ea42
Add numberArrayType
linter type
...
Add `numberArrayType` specialised type for cases where we know we have
an array of numbers. Use in some stdlib functions and `importbin`.
2022-03-03 22:49:02 +00:00
Angus Lees
856bd58872
Add 'importbin' statement
...
Add `importbin` statement. Similar to `importstr` but the result is
an array of numbers (all integers 0-255).
2022-03-03 22:49:02 +00:00
Stanisław Barzowski
b00b56c335
Avoid depending on stdlib variable for desugaring.
...
The fix is easy – we just use "$std" which the user cannot access,
because it's not a valid identifier.
2021-08-09 19:25:33 +01:00
Tsuyoshi Hombashi
51daeb3229
Modify jsonnet-lint to accept multiple input files ( #545 )
...
Modify jsonnet-lint to accept multiple input files
2021-07-01 13:10:51 +02:00
Stanisław Barzowski
46d1fceb9c
[Linter] Fix super index type and handle "object or string" indexing correctly.
2021-06-06 21:13:19 +02:00
Lucas Servén Marín
12bd29d164
linter: correct the return type for member
...
This commit corrects return type of the `member` function from the
standard library.
Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
2021-05-26 13:52:39 +02:00
Greg Roodt
e6a9581713
Adds std.parseYaml ( #339 )
...
Add support for std.parseYaml.
Co-authored-by: Stanisław Barzowski <stanislaw.barzowski@gmail.com>
2021-05-20 14:16:23 +02:00
Stanisław Barzowski
5899996502
Make go linter happy again.
2021-05-19 15:10:49 +02:00
Yiannis
ce76155e09
Fix strip definition
...
Co-authored-by: Tom Fenech <tomjwfenech@gmail.com>
2021-05-19 13:57:47 +02:00
Yiannis
bead95bfa6
Add linter support for std.strip and friends
2021-05-14 17:01:21 +02:00
Stanisław Barzowski
74b3a1b669
[Linter] Support std.member and std.repeat.
2021-03-25 18:35:13 +01:00
Stanisław Barzowski
7d81091149
Linter README – replace unicode asterisks
...
I think they were an artifact of copying from a LaTeX-generated PDF.
2021-02-21 20:59:24 +01:00
Stanisław Barzowski
31d71aaccd
Add missing linter metadata for stdlib.
...
Fixes #483 .
2021-01-01 19:17:40 +01:00
Stanisław Barzowski
6140a2f75a
Better stacktrace for manifestation, +: and object assertions.
...
Fixes #282
2021-01-01 19:17:27 +01:00
Stanisław Barzowski
8fcbda5b50
Linter
2020-08-13 21:06:34 +02:00
Stanisław Barzowski
9ada769ce4
Make golangci-lint happy
...
Some of the suggestions are minor bug fixes (missing error handling).
2020-03-05 14:54:27 +01:00
Dave Cunningham
0e67cc3c68
Refactor to allow interleaving optional and positional params
2020-03-05 09:33:21 +01:00
Dave Cunningham
dc5c94ac78
Add fodder to AST nodes ( #319 )
...
* Preserve fodder during parsing.
2019-09-24 12:11:22 +01:00
Stanisław Barzowski
45f3912215
Make parser package internal
...
There is no reason for external users to directly depend
on parser. It had a few random things exported as well,
namely errors and "children" functions (helpers for AST
traversal).
It was easy to extract the errors package, but I needed to leave
children in parser for now. The errors package was also
made internal, but it's a candidate for making it public
again potentially (if someone wants to display error messages
just like us). For now it's probably too incomplete anyway.
This change has a potential of breaking the existing users
since we technically remove public APIs. These were not needed
or even helpful for actually running Jsonnet code, but perhaps
someone used them anyway.
2019-09-03 17:28:33 +02:00
Steve Harris
ad72eb0fbb
Allow building the Go program with Bazel
2019-06-15 01:34:11 +02:00
Marcelo Cantos
88519c3704
Apply more golint recommendations ( #201 )
...
* Apply more golint recommendations
* Update dumpstdlibast.go to include StdAst comment
* Improve dump.go package comment.
2018-02-28 01:11:18 -05:00
Marcelo Cantos
ed5f280c59
Apply golint recommendations ( #196 )
...
* Apply golint recommendations
2018-02-26 14:12:25 -05:00
Stanisław Barzowski
bc88189964
Very basic, experimental linter
...
No tests yet
2018-01-15 21:05:52 -05:00