nushell/crates/nu-command/src
Artemiy 5f7425a7b4
Xml errors fix (#11487)
# Description
Fixes #11264
This PR adds checks in `to xml` to output error for malformed xml
entries:
* With columns that are not one of `tag`, `attributes` or `content`
* With no `tag` when entry is not a string
* With `tag` that is not a string
This PR also replaces `attrs` with `attributes` in example and
extra_usage of `to xml` (column was originally named attrs and renamed
to attributes, but this was missed in docs)

# User-Facing Changes
`to xml` will produce error for conditions described above instead of
silently returning nothing

# Tests + Formatting
Added tests for `to xml` to check handling of malformed xml entries
2024-01-05 15:56:13 -06:00
..
bytes Allow spreading arguments to commands (#11289) 2023-12-28 15:43:20 +08:00
charting Construct Records only through checked helpers (#11386) 2023-12-21 16:48:15 +01:00
conversions Enforce required, optional, and rest positional arguments start with an uppercase and end with a period. (#11285) 2023-12-15 14:32:37 +08:00
database Construct Records only through checked helpers (#11386) 2023-12-21 16:48:15 +01:00
date Enforce required, optional, and rest positional arguments start with an uppercase and end with a period. (#11285) 2023-12-15 14:32:37 +08:00
debug Bump sysinfo from 0.29 to 0.30 (#11484) 2024-01-05 05:31:29 -06:00
env Enforce required, optional, and rest positional arguments start with an uppercase and end with a period. (#11285) 2023-12-15 14:32:37 +08:00
experimental Bump windows from 0.48.0 to 0.52.0 (#11325) 2023-12-21 18:49:15 +01:00
filesystem Fix rm for symlinks pointing to directory on windows (issue #11461) (#11463) 2024-01-02 21:27:03 +08:00
filters Refactor group-by with closure grouper (#11370) 2023-12-19 15:48:37 +08:00
formats Xml errors fix (#11487) 2024-01-05 15:56:13 -06:00
generators Enforce required, optional, and rest positional arguments start with an uppercase and end with a period. (#11285) 2023-12-15 14:32:37 +08:00
hash Enforce required, optional, and rest positional arguments start with an uppercase and end with a period. (#11285) 2023-12-15 14:32:37 +08:00
help Enforce required, optional, and rest positional arguments start with an uppercase and end with a period. (#11285) 2023-12-15 14:32:37 +08:00
math Enforce required, optional, and rest positional arguments start with an uppercase and end with a period. (#11285) 2023-12-15 14:32:37 +08:00
misc Enforce required, optional, and rest positional arguments start with an uppercase and end with a period. (#11285) 2023-12-15 14:32:37 +08:00
network Allow http commands' automatic redirect-following to be disabled (#11329) 2023-12-28 15:26:34 +08:00
path Enforce required, optional, and rest positional arguments start with an uppercase and end with a period. (#11285) 2023-12-15 14:32:37 +08:00
platform Fix build for BSDs (#11372) 2023-12-19 08:58:45 -06:00
random Enforce required, optional, and rest positional arguments start with an uppercase and end with a period. (#11285) 2023-12-15 14:32:37 +08:00
removed Enforce required, optional, and rest positional arguments start with an uppercase and end with a period. (#11285) 2023-12-15 14:32:37 +08:00
shells Enforce required, optional, and rest positional arguments start with an uppercase and end with a period. (#11285) 2023-12-15 14:32:37 +08:00
stor Simplify the feature gates for stor commands (#11416) 2023-12-24 13:31:46 +01:00
strings Construct Records only through checked helpers (#11386) 2023-12-21 16:48:15 +01:00
system Bump sysinfo from 0.29 to 0.30 (#11484) 2024-01-05 05:31:29 -06:00
viewers Convert Shellerror::GenericError to named fields (#11230) 2023-12-07 00:40:03 +01:00
default_context.rs Add ulimit command (#11324) 2023-12-15 07:11:17 -06:00
example_test.rs feat: Add unfold command (#10489) 2023-09-30 09:08:06 -05:00
lib.rs Simplify the feature gates for stor commands (#11416) 2023-12-24 13:31:46 +01:00
progress_bar.rs cp progress bar implementation (#8012) 2023-02-22 11:57:38 -08:00
sort_utils.rs Convert Shellerror::GenericError to named fields (#11230) 2023-12-07 00:40:03 +01:00