cb7b707457
Close input files after processing each one ( #2796 ) ( #2808 )
...
readStream opened an *os.File but returned a *bufio.Reader, so the
*os.File type switch in streamEvaluator.EvaluateFiles never matched and
no input file was ever closed. allAtOnceEvaluator.EvaluateFiles did not
attempt to close them at all. Descriptors were only released at process
exit or by the os.File finaliser, so a multi-file run could exhaust the
file descriptor limit.
readStream now returns an explicit cleanup function alongside the reader,
which both evaluators call once the file has been processed.
Co-authored-by: Pablo Garcia <pablito@MacBook-Neo-de-Pablo.local >
Co-authored-by: Mike Farah <mikefarah@gmail.com >
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-19 14:17:53 +10:00
Mike Farah and GitHub
13d1bbb45f
Generic ast ( #1829 )
...
Remove dependency on yaml.Node for internal AST representation. Yaml decoder is now just another decoder.
2023-10-18 12:11:53 +11:00
Mike Farah and GitHub
880397d549
Refactored decoder responsibilities ( #1402 )
...
- improved comment handling
- yaml decoder now responsible for leading content work around
2022-10-28 14:16:46 +11:00
Mikhail Katychev and GitHub
406bbb8ca4
handled EvaluateNodes panic ( #1140 )
2022-03-15 13:28:52 +11:00
Mike Farah
535799462f
Added eval operator
2022-02-01 14:47:51 +11:00
Mike Farah and GitHub
df32baedf1
Added XML decoder ( #1044 )
2021-12-21 15:02:07 +11:00
Matthieu MOREL and GitHub
59752fb36d
enable more linters ( #1043 )
...
* enable revive linter
* enable gochecknoinits linter
* enable unconvert linter
* enable unparam linter
* enable asciicheck linter
* enable depguard linter
* enable nakedret linter
* enable megacheck linter
* enable nolintlint linter
* enable predeclared linter
* Update go.yml
* Update go.yml
2021-12-21 09:30:08 +11:00
Mike Farah
d912d7d178
wip
2021-11-14 10:59:50 +11:00
Mike Farah
0064b68ed9
Revert "Removed leadingContentPreProcessing flag - header preprocessing is stable"
...
This reverts commit 4ce9433468 .
2021-10-15 11:47:00 +11:00
Mike Farah
4ce9433468
Removed leadingContentPreProcessing flag - header preprocessing is stable
2021-10-15 08:53:00 +11:00
Mike Farah
cb95ab1494
Fixed merge comment issue #919
2021-08-26 16:31:26 +10:00
Mike Farah
4e628327c4
Better way of processing leading content
2021-07-20 10:19:55 +10:00
Mike Farah
bbebebe30c
Fixed for most cases, except strip comments
2021-07-20 09:18:40 +10:00
Mike Farah
3a6f73e836
wip
2021-07-19 19:52:51 +10:00
Mike Farah
f6e2ab5cef
Remember comments in empty files
2021-07-16 22:08:22 +10:00
Mike Farah
28a8721f49
Handle empty files
2021-07-16 21:08:20 +10:00
Mike Farah
d74bb8e28d
Adding magic to detect leading seperators
2021-07-15 11:34:49 +10:00
Mike Farah
c6efd5519b
Pass context through operators
...
Allows more sophisticated functionality
2021-02-11 10:58:40 +11:00
Mike Farah
e86f83fb69
Renaming pathtree to expression
2021-02-11 10:58:40 +11:00
Mike Farah
7d5b6b5442
Removed global vars
2021-02-11 10:58:40 +11:00
Mike Farah
ba223df4ac
Moved eval function to eval interface
2021-02-11 10:58:40 +11:00
Mike Farah
c1cf8b4e34
fixing exposed functions and interfaces
2021-02-11 10:58:40 +11:00
Mike Farah
fc3af441e5
Extracted out evaluators
2020-11-22 11:56:28 +11:00