Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# XRLint Change History

## Version 0.5.2 (in development)

### Adjustments and Enhancements

- Core rule 'time-coordinates' now support ms, µs and ns. (#66)

## Version 0.5.1 (from 2025-02-21)

- XRLint now also loads default configuration from files named
Expand Down
13 changes: 11 additions & 2 deletions xrlint/plugins/core/rules/time_coordinate.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,27 @@
"second",
"sec",
"s",
"milliseconds",
"millisecond",
"ms",
"microseconds",
"microsecond",
"µs",
"nanoseconds",
"nanosecond",
"ns",
)

_ALL_UNITS_OF_TIME = (*_AMBIGUOUS_UNITS_OF_TIME, *_UNAMBIGUOUS_UNITS_OF_TIME)

_RE_DATE = re.compile(r"^\d{4}-\d{1,2}-\d{1,2}$")
_RE_TIME = re.compile(r"^\d{1,2}:\d{1,2}:\d{1,2}(\.\d{1,6})?$")
_RE_TIME = re.compile(r"^\d{1,2}:\d{1,2}:\d{1,2}(\.\d{1,9})?$")
_RE_TZ = re.compile(r"^[+-]\d{1,2}:\d{1,2}$")


@plugin.define_rule(
"time-coordinate",
version="1.0.0",
version="1.0.1",
type="problem",
description=(
"Time coordinates should have valid and unambiguous time units encoding."
Expand Down
2 changes: 1 addition & 1 deletion xrlint/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# This software is distributed under the terms and conditions of the
# MIT license (https://mit-license.org/).

version = "0.5.1"
version = "0.5.2.dev0"