]> _ Git - alire.git/commit
Disallow dots in identifiers (#1267)
authorPiotr Orzechowski <piotr@orzechowski.tech>
Wed, 18 Jan 2023 16:14:34 +0000 (17:14 +0100)
committerGitHub <noreply@github.com>
Wed, 18 Jan 2023 16:14:34 +0000 (17:14 +0100)
commit191656f65f0dc1bb47d644285088c4bd5367fe61
treed4991105cd59ec228049fa9ba0fa484c046cbc26
parentb6a236127a2097d9ca1473757f31ce551266eabc
Disallow dots in identifiers (#1267)

* Disallow leading dot in identifiers

This is to avoid `alr printenv` printing invalid
environment variable names, i.e. with leading dot.

* Fix typo in run_alr error message

* Simplify crate name validation test code

* Use two letters for min crate name length verification

* Test init with valid crate name

* Add more test cases for bad index name

* Use constant instead of dot literal

* Disallow dots in identifiers

Dots in identifiers are allowed by mistake.
This commit forbids them completely, instead
of just disallowing dots as the first character
in crate name.
src/alire/alire-crates.adb
src/alire/alire.ads
testsuite/drivers/alr.py
testsuite/tests/index/bad-name/test.py
testsuite/tests/init/crate-name-validation/test.py [new file with mode: 0644]
testsuite/tests/init/crate-name-validation/test.yaml [new file with mode: 0644]