1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-07-30 13:47:46 +00:00
Commit graph

6 commits

Author SHA1 Message Date
Douglas
c17dcc3855
Fix failing lints on source files (#1049)
This PR updates the toolkit testing to:

* Determine whether to lint as a module or source file based on the
presence of any `export ` line in the file.
* Run `nu-check` on files before linting with `use <file>` or `source
<file>`
* Updates the environment variable to `TEST_METHOD` with options for
`ide-check` or `import-or-source`.
* Updates the default to `import-or-source` (was `ide-check`) to match
CI
* Removes environment variable from CI since this test method is now the
default.

With this in place we should have far fewer (false positive) failing CI
runs.
2025-02-17 09:14:30 -05:00
Nguyễn Hồng Quân
a6c41303bb
Update toolkit.nu per removal of stdlib-candidate (#1046)
stdlib-candidate was removed in #1042 but test script still refer on it.

The concensus is to
[remove](https://github.com/nushell/nu_scripts/pull/1044#discussion_r1954636683)
the test case.
2025-02-13 20:53:09 -06:00
Wind
2dadab779b
add path replace-extension to stdlib-candidate (#1002)
Adds `path replace-extension` as requested in https://github.com/nushell/nushell/issues/14144

Also sets up testing for candidates. In order to do this, I made
some changes:

1. ported `nu-std/testing.nu` under `stdlib-candidate` folder, and
making some changes.
2. run candidate tests in `toolkit check pr` command, to make sure the
test is run in CI.
3. including `stdlib-candidate` to `NU_LIB_DIRS` when running lint, so
the tests can pass linter.

Changes in stdlib-candidate/testing.nu:

1. remove `std/log` usage
2. including `stdlib-candidate` path in `run-test` command
2025-01-03 23:57:13 -05:00
Antoine Stevan
cc62dd7f0f
don't return anything from toolkit command (#992)
i get the following LSP error in my editor, because it's true `main`
does not return a `string` 🤔


![image](https://github.com/user-attachments/assets/787f62f8-ef66-4ac4-ba30-c396d3cdd4d2)


in this PR, i propose to truely return `nothing` from this _main_
command by `print`ing the help page.

### alternative
we could also change the signature to `nothing -> string`
2024-12-12 08:05:51 -06:00
Texas Toland
878bfc615c
Refactor toolkit.nu (#791)
Closes #789 🍻

- Runs without first generating a script
- Returns error (file) count
- Requires `--and-exit` to exit with error code
- Enables alternative report with env `STUB_IDE_CHECK=true`
- Expands documentation
- All subcommands share same file querying
- Prepares for nupm test integration
2024-03-15 19:17:31 +02:00
Auca Coyan
c2ef662e48
add a nu-check verification CI (#771)
I made a `toolkit.nu` with a very bare bones struct, this is called via
[`setup-nu`](https://github.com/hustcer/setup-nu) action, and generates
the `check-files.nu` file. After that, another nu instance run that
script to check files one by one. The folder `before_v0.60/` is
excluded.
2024-03-12 20:48:08 +01:00