You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During link validation for a .cshtml file (Razor); I noted that it would tell me the location of the file it couldn't validate, but not the line number:
[INFO] ========== Analyzer Results ==========
[WARN] [C:/Users/George/src/doubleyourproductivity/DypGenerator/input/corporate.cshtml => corporate.html] Could not validate relative link: <link rel="stylesheet" href="../css/bulma-divider.min.css"> (ValidateR elativeLinks)
[WARN] [C:/Users/George/src/doubleyourproductivity/DypGenerator/input/corporate.cshtml => corporate.html] Could not validate relative link: <a class="navbar-item is-size-5 has-text-weight-semibold" href="/free" >
Free Content
</a> (ValidateRelativeLinks)
[WARN] [C:/Users/George/src/doubleyourproductivity/DypGenerator/input/index.cshtml => index.html] Could not validate relative link: <a class="navbar-item is-size-5 has-text-weight-semibold" href="/free">
Free Content
</a> (ValidateRelativeLinks)
[WARN] [C:/Users/George/src/doubleyourproductivity/DypGenerator/input/paid.cshtml => paid.html] Could not validate relative link: <link rel="stylesheet" href="../css/bulma-divider.min.css"> (ValidateRelativeLin ks)
[WARN] [C:/Users/George/src/doubleyourproductivity/DypGenerator/input/paid.cshtml => paid.html] Could not validate relative link: <a class="navbar-item is-size-5 has-text-weight-semibold" href="/free">
Free Content
</a> (ValidateRelativeLinks)
[WARN] 5 total relative links could not be validated (ValidateRelativeLinks)
[INFO] ========== Completed ==========
[INFO] Finished execution in 3860 ms
[INFO] Cleaned temp directory C:/Users/George/src/doubleyourproductivity/DypGenerator/temp
gjstocker@dor MINGW64 ~/src/doubleyourproductivity/DypGenerator (1-statiq-netily-migration)
Recommend that the line number is included in the ValidateRelativeLink function, for ease of finding the line for the error.
The text was updated successfully, but these errors were encountered:
Excellent idea! I'm going to need to think about implementation a bit though because the line number in the file doesn't necessarily line up with what the Razor engine sees due to stripping out front matter. My first thought is that there are actually a bunch of places where knowing that offset could be valuable for debugging - perhaps a universal ContentOffset value inside the IContentProvider might work well here 🤔. Then any logging that needs to be done relative to line numbers can add the offset to get the real line number of the file on disk (and any modules that remove content can increment it).
During link validation for a .cshtml file (Razor); I noted that it would tell me the location of the file it couldn't validate, but not the line number:
Recommend that the line number is included in the ValidateRelativeLink function, for ease of finding the line for the error.
The text was updated successfully, but these errors were encountered: