Match the most specific route, not the first declared #7

Open
reviewer wants to merge 1 commit from feature/route-priorities into main
Owner

Closes #1.

Scores each matching route by specificity — literals beat parameters, parameters beat wildcards — and returns the highest. Declaration order still breaks ties, so nothing reorders silently.

  • Scoring
  • Tests for the reported case
  • Tie-break test
  • README table
Closes #1. Scores each matching route by specificity — literals beat parameters, parameters beat wildcards — and returns the highest. Declaration order still breaks ties, so nothing reorders silently. - [x] Scoring - [x] Tests for the reported case - [x] Tie-break test - [ ] README table
Declaration order decided this before, so a wildcard declared early swallowed
a literal declared later. Scores each match by specificity instead.
reviewer left a comment
No description provided.
Reads clearly and the tie-break behaviour is the right call. Worth a line in the README before this ships, but nothing blocking.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feature/route-priorities:feature/route-priorities
git switch feature/route-priorities

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff feature/route-priorities
git switch feature/route-priorities
git rebase main
git switch main
git merge --ff-only feature/route-priorities
git switch feature/route-priorities
git rebase main
git switch main
git merge --no-ff feature/route-priorities
git switch main
git merge --squash feature/route-priorities
git switch main
git merge --ff-only feature/route-priorities
git switch main
git merge feature/route-priorities
git push origin main
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
reviewer/atlas!7
No description provided.