Codeberg/Documentation
43
151
Fork
You've already forked Documentation
128

Fix lint issues #629

Merged
Gusted merged 6 commits from :walpo/fix-lint-issues into main 2025年11月21日 12:35:06 +01:00
Contributor
Copy link

Changelog

The format is based on Keep a Changelog.

Fixed

  • Lint issues:
    • Line length (MD013).
    • Heading levels should only increment by one level at a time (MD001).
    • Link fragments should be valid (MD051).

# Changelog The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## Fixed - Lint issues: - Line length ([MD013](https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md013.md)). - Heading levels should only increment by one level at a time ([MD001](https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md001.md)). - Link fragments should be valid ([MD051](https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md051.md)). ---
docs: lint documentation
All checks were successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/deploy-preview Pipeline was successful
90c3f47e17
Author
Contributor
Copy link

The Spell Checker, markdownlint and Prettier lint checks pass successfully in my local machine for 90c3f47e17.

docker run -v $PWD:/workdir davidanson/markdownlint-cli2:v0.18.1 "**/*.md" "#node_modules"; docker run --rm -it -v ./:/app/ --entrypoint='prettier' documentation:prettier --check .; docker run --rm -itv ./:/app documentation:cspell pnpx cspell lint --no-progress --gitignore '{**,.*}/{*,.*}'
markdownlint-cli2 v0.18.1 (markdownlint v0.38.0)
Finding: **/*.md !node_modules
Linting: 76 file(s)
Summary: 0 error(s)
Checking formatting...
All matched files use Prettier code style!
! Corepack is about to download https://registry.npmjs.org/pnpm/-/pnpm-10.12.1.tgz
? Do you want to continue? [Y/n] y
Packages: +113
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 113, reused 0, downloaded 113, added 113, done
CSpell: Files checked: 78, Issues found: 0 in 0 files.
The Spell Checker, markdownlint and Prettier lint checks pass successfully in my local machine for 90c3f47e17. ```bash docker run -v $PWD:/workdir davidanson/markdownlint-cli2:v0.18.1 "**/*.md" "#node_modules"; docker run --rm -it -v ./:/app/ --entrypoint='prettier' documentation:prettier --check .; docker run --rm -itv ./:/app documentation:cspell pnpx cspell lint --no-progress --gitignore '{**,.*}/{*,.*}' markdownlint-cli2 v0.18.1 (markdownlint v0.38.0) Finding: **/*.md !node_modules Linting: 76 file(s) Summary: 0 error(s) Checking formatting... All matched files use Prettier code style! ! Corepack is about to download https://registry.npmjs.org/pnpm/-/pnpm-10.12.1.tgz ? Do you want to continue? [Y/n] y Packages: +113 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Progress: resolved 113, reused 0, downloaded 113, added 113, done CSpell: Files checked: 78, Issues found: 0 in 0 files. ```
pat-s requested changes 2025年06月18日 10:38:11 +02:00
Dismissed
pat-s left a comment
Member
Copy link

I don't think forced line-breaks are a good idea.
Instead, my vote goes to "one sentence per line" with a line-length setting that allows for medium-length sentences.
120 might be too narrow for this. I usually go with 200 but I am also not so strict about this.

One-sentence-per line has many advantages in reviewing.

I don't think forced line-breaks are a good idea. Instead, my vote goes to "one sentence per line" with a line-length setting that allows for medium-length sentences. 120 might be too narrow for this. I usually go with 200 but I am also not so strict about this. One-sentence-per line has many advantages in reviewing.

Surge PR preview deployment succeeded. View it at https://Codeberg-Documentation-pr-629.surge.sh

<!--woodpeckerci-plugin-surge-preview--> Surge PR preview deployment succeeded. View it at https://Codeberg-Documentation-pr-629.surge.sh
Author
Contributor
Copy link

The matter of having a line length limit of 120 characters was discussed and agreed upon in the Matrix chat channel if I remember correctly. The resultant pull requests were Codeberg/Documentation#463 and Codeberg/Documentation#623.

In Markdown/CommonMark, even if you split a line into multiple lines, as long as there is no blank lines separating them, they will be all rendered as part of the same paragraph, separated by a whitespace.

In my opinion, the new line length limit helps to improve code readability because it reduces the need to use word wrap in text editors when working with long lines of text, as well as leading people to write content in a more structured way (avoiding "wall of texts"). The documentation had some very long lines of text prior to the merged PR.

Feel free to discuss this matter with other key members of the community, but please keep in mind this PR simply fixes the lint issues raised by markdownlint as currently configured in .markdownlint.yaml.

The matter of having a line length limit of 120 characters was discussed and agreed upon in the Matrix chat channel if I remember correctly. The resultant pull requests were Codeberg/Documentation#463 and Codeberg/Documentation#623. In Markdown/CommonMark, even if you split a line into multiple lines, as long as there is no blank lines separating them, they will be all rendered as part of the same paragraph, separated by a whitespace. In my opinion, the new line length limit helps to improve code readability because it reduces the need to use word wrap in text editors when working with long lines of text, as well as leading people to write content in a more structured way (avoiding "wall of texts"). The documentation had some very long lines of text prior to the merged PR. Feel free to discuss this matter with other key members of the community, but please keep in mind this PR simply fixes the lint issues raised by `markdownlint` as currently configured in `.markdownlint.yaml`.
Member
Copy link

In Markdown/CommonMark, even if you split a line into multiple lines, as long as there is no blank lines separating them, they will be all rendered as part of the same paragraph, separated by a whitespace.

I know, no need to explain the basics :) (and I am aware you didn't mean this in a negative context)

In my opinion, the new line length limit helps to improve code readability because it reduces the need to use word wrap in text editors when working with long lines of text, as well as leading people to write content in a more structured way (avoiding "wall of texts"). The documentation had some very long lines of text prior to the merged PR.

Applying a hard-split doesn't help with this at all IMO. Too long sentences are best detected with the "one sentence per line" rule and then realizing that certain ones are just super/too long. Yes, this can be combined with a line-length linter to have an automatic lint fail during CI checks but just hard-breaking at length X is not at all a solution.

Editors can soft-wrap and that should be used if screen real estate is an error.

Feel free to discuss this matter with other key members of the community,

CB has no official responsibilities for (almost) any repo, which is a (huge) problem since ever. I am a "CB core" member for years and due to this could consider myself "having a word" here but I don't have more to say than anybody else. This then again means the same for "the community in the matrix chat" - whoever that refers to exactly.

And yes, I could/should have intervened in the previous PR already but I didn't want to bring up this general discussion again. But yes, I should have realized it will come up anyhow in a follow-up PR.

Anyways, I shouldn't get myself into such discussions in the first place, as the main issue is that nobody is "officially" responsible and setting the rules, so everything is vague and often stuck.
So in the end it was my fault (without any irony) and I should just focus on other things than doing reviews here.

Sorry if that is perceived negatively in any way, it shouldn't be, people like you are needed to push something forward! (I am just over and over again desperate about the lack of roles & responsibilities). Anyhow, I'll unblock and leave future reviews to somebody else.

> In Markdown/CommonMark, even if you split a line into multiple lines, as long as there is no blank lines separating them, they will be all rendered as part of the same paragraph, separated by a whitespace. I know, no need to explain the basics :) (and I am aware you didn't mean this in a negative context) > In my opinion, the new line length limit helps to improve code readability because it reduces the need to use word wrap in text editors when working with long lines of text, as well as leading people to write content in a more structured way (avoiding "wall of texts"). The documentation had some very long lines of text prior to the merged PR. Applying a hard-split doesn't help with this at all IMO. Too long sentences are best detected with the "one sentence per line" rule and then realizing that certain ones are just super/too long. Yes, this can be combined with a line-length linter to have an automatic lint fail during CI checks but just hard-breaking at length X is not at all a solution. Editors can soft-wrap and that should be used if screen real estate is an error. > Feel free to discuss this matter with other key members of the community, CB has no official responsibilities for (almost) any repo, which is a (huge) problem since ever. I am a "CB core" member for years and due to this *could* consider myself "having a word" here but I don't have more to say than anybody else. This then again means the same for "the community in the matrix chat" - whoever that refers to exactly. And yes, I could/should have intervened in the previous PR already but I didn't want to bring up this general discussion again. But yes, I should have realized it will come up anyhow in a follow-up PR. Anyways, I shouldn't get myself into such discussions in the first place, as the main issue is that nobody is "officially" responsible and setting the rules, so everything is vague and often stuck. So in the end it was my fault (without any irony) and I should just focus on other things than doing reviews here. Sorry if that is perceived negatively in any way, it shouldn't be, people like you are needed to push something forward! (I am just over and over again desperate about the lack of roles & responsibilities). Anyhow, I'll unblock and leave future reviews to somebody else.
pat-s dismissed pat-s's review 2025年06月22日 00:00:29 +02:00
mahlzahn left a comment
Collaborator
Copy link

Although it will be rendered correctly, these artificial hard breaks triggers some negative
feelings in me.

I like the breaks between sentences, though.

Although it will be rendered correctly, these artificial hard breaks triggers some negative feelings in me. I like the breaks between sentences, though.
@ -176,2 +199,3 @@
If you had a teammate running an agent in another continent, you would then change the location label in both the workflow and the agent from region-1 to region-2 or region-3 accordingly. If you wanted to run tests with a different peripheral, you'd change the peripheral label, etc.
If you had a teammate running an agent in another continent, you would then change the location label in both the
workflow and the agent from region-1 to region-2 or region-3 accordingly. If you wanted to run tests with a different
Collaborator
Copy link

Here a sentence change is missed.

Here a sentence change is missed.
Gusted marked this conversation as resolved
Author
Contributor
Copy link

This PR simply enforces what was agreed previously in the Matrix chat channel.

If you need any more changes from my side, feel free to bring them up.
From my point of view, the PR is ready for review and merge.

This PR simply enforces what was agreed previously in the Matrix chat channel. If you need any more changes from my side, feel free to bring them up. From my point of view, the PR is ready for review and merge.
Author
Contributor
Copy link

Do I have to make any more changes to this PR to make it progress?

Do I have to make any more changes to this PR to make it progress?
walpo changed title from (削除) Fix lint issues (削除ここまで) to Draft: Fix lint issues 2025年11月20日 11:36:48 +01:00
walpo force-pushed walpo/fix-lint-issues from 90c3f47e17
All checks were successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/deploy-preview Pipeline was successful
to c7fc93eaf1
Some checks failed
ci/woodpecker/pr/lint Pipeline failed
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/deploy-preview Pipeline was successful
2025年11月20日 14:43:29 +01:00
Compare
walpo changed title from (削除) Draft: Fix lint issues (削除ここまで) to Fix lint issues 2025年11月20日 14:47:19 +01:00
Author
Contributor
Copy link

I have fixed new lint errors that have emerged these last few months.

This PR needs to be reviewed again.

I have fixed new lint errors that have emerged these last few months. This PR needs to be reviewed again.
Author
Contributor
Copy link
@gusted

So for my understanding, fixes are from existing lint rules right? But markdown lint is called in the CI, why wasn't it catched before?

So for my understanding, fixes are from existing lint rules right? But markdown lint is called in the CI, why wasn't it catched before?
Gusted left a comment
Owner
Copy link

Content looks good, checked some pages that the rendering didn't change.

Content looks good, checked some pages that the rendering didn't change.

You can ignore the CI failure for links.

[warn] content/getting-started/faq.md

looks interesting from prettier. Could you run prettier -w . and commit the result?

You can ignore the CI failure for links. > [warn] content/getting-started/faq.md looks interesting from prettier. Could you run `prettier -w .` and commit the result?

@Gusted wrote in #629 (comment):

So for my understanding, fixes are from existing lint rules right? But markdown lint is called in the CI, why wasn't it catched before?

Found the problem, !702

@Gusted wrote in https://codeberg.org/Codeberg/Documentation/pulls/629#issuecomment-8382147: > So for my understanding, fixes are from existing lint rules right? But markdown lint is called in the CI, why wasn't it catched before? Found the problem, !702
lint: apply prettier lint
Some checks failed
ci/woodpecker/pr/deploy-preview Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint Pipeline failed
13e57112f9
lint: apply prettier lint
Some checks failed
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/deploy-preview Pipeline was successful
ci/woodpecker/pr/lint Pipeline failed
ci/woodpecker/pull_request_closed/deploy-preview Pipeline is pending approval
98423a0456
Author
Contributor
Copy link

I had an outdated version of the Prettier image locally which produced a different result than the lint job running in the Codeberg CI. I have updated the local image and applied the lint --write in both PRs.

I have also added the .pnpm-store directory to the Pretty ignore file in both PRs. As soon as that change is merged through one PRs, the other should merge just fine as well (identical change).

Let's see if the lint tests now run successfully here.

I had an outdated version of the Prettier image locally which produced a different result than the lint job running in the Codeberg CI. I have updated the local image and applied the lint `--write` in both PRs. I have also added the `.pnpm-store` directory to the Pretty ignore file in both PRs. As soon as that change is merged through one PRs, the other should merge just fine as well (identical change). Let's see if the lint tests now run successfully here.
Gusted referenced this pull request from a commit 2025年11月21日 12:35:07 +01:00
Sign in to join this conversation.
No reviewers
Labels
Clear labels
Codeberg Pages

Issues affecting Codeberg Pages
Documentation Usability

Issues related to using and reading docs.codeberg.org
Forgejo
Good First Issue! 👋
Kind: Bug
Kind: Documentation
Kind: Enhancement
Kind: Feature
Kind: Question
Kind: Security
Licensing
Part: Generator

This is related to the generation of the documentation, not to the content itself
Priority: High

The priority is high
Priority: Low

The priority is low
Priority: Medium

The priority is medium
Reviewed: Confirmed

Something has been confirmed
Reviewed: Duplicate

Something exists already
Reviewed: Invalid

Something was marked as invalid
Reviewed: Wontfix

Something won't be fixed
Status: Blocked
Status: Help wanted

Contributions are welcome!
Status: In progress

Work is in progress
Status: Needs feedback

Feedback is needed
Status: Ready for Review

Work is completed
Status: Review

Review is in progress / Reviewers wanted
Status: Stale
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
5 participants
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
Codeberg/Documentation!629
Reference in a new issue
Codeberg/Documentation
No description provided.
Delete branch ":walpo/fix-lint-issues"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?