Skip to content

Commit

Permalink
Fix 404s in rule description links (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
daniilsapa authored Nov 21, 2024
1 parent 7a7082f commit b3f7085
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/thirty-turtles-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'steiger': patch
---

Fix 404s in rule description links
6 changes: 5 additions & 1 deletion packages/steiger/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@ import { runRule } from './features/run-rule'
import { removeGlobalIgnoreFromVfs } from './features/remove-global-ignores-from-vfs'
import { calculateFinalSeverities } from './features/calculate-diagnostic-severities'

// TODO: make this part of a plugin
function getRuleDescriptionUrl(ruleName: string) {
return new URL(`https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/${ruleName}`)
const withoutNamespace = ruleName.split('/')[1]
return new URL(
`https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/${withoutNamespace}`,
)
}

async function runRules({ vfs, rules }: { vfs: Folder; rules: Array<Rule> }) {
Expand Down

0 comments on commit b3f7085

Please sign in to comment.