{"id":13809039,"url":"https://github.com/bombsimon/wsl","last_synced_at":"2026-01-23T00:18:41.708Z","repository":{"id":40625851,"uuid":"149125503","full_name":"bombsimon/wsl","owner":"bombsimon","description":"␊ Whitespace Linter - Forces you to use empty lines!","archived":false,"fork":false,"pushed_at":"2025-05-06T20:51:02.000Z","size":7071,"stargazers_count":291,"open_issues_count":4,"forks_count":42,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-08T02:47:08.438Z","etag":null,"topics":["hacktoberfest","linter","whitespace-linter"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bombsimon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-09-17T12:58:34.000Z","updated_at":"2025-05-05T16:08:43.000Z","dependencies_parsed_at":"2024-01-17T15:03:35.278Z","dependency_job_id":"d671c001-c072-4886-99c1-e42b3f22f41b","html_url":"https://github.com/bombsimon/wsl","commit_stats":{"total_commits":155,"total_committers":20,"mean_commits":7.75,"dds":"0.21935483870967742","last_synced_commit":"b3eb50bfa3119098ddb040df531a195b9a865113"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bombsimon%2Fwsl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bombsimon%2Fwsl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bombsimon%2Fwsl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bombsimon%2Fwsl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bombsimon","download_url":"https://codeload.github.com/bombsimon/wsl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254052674,"owners_count":22006716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","linter","whitespace-linter"],"created_at":"2024-08-04T01:01:58.970Z","updated_at":"2026-01-23T00:18:41.645Z","avatar_url":"https://github.com/bombsimon.png","language":"Go","readme":"# wsl - Whitespace Linter\n\n[![forthebadge](https://forthebadge.com/images/badges/made-with-go.svg)](https://forthebadge.com)\n[![forthebadge](https://forthebadge.com/images/badges/built-with-love.svg)](https://forthebadge.com)\n\n[![GitHub Actions](https://github.com/bombsimon/wsl/actions/workflows/go.yml/badge.svg)](https://github.com/bombsimon/wsl/actions/workflows/go.yml)\n[![Coverage Status](https://coveralls.io/repos/github/bombsimon/wsl/badge.svg?branch=master)](https://coveralls.io/github/bombsimon/wsl?branch=master)\n\n`wsl` is a linter that enforces a very **non scientific** vision of how to make\ncode more readable by enforcing empty lines at the right places.\n\n**This linter is aggressive** and a lot of projects I've tested it on have\nfailed miserably. For this linter to be useful at all I want to be open to new\nideas, configurations and discussions! Also note that some of the warnings might\nbe bugs or unintentional false positives so I would love an\n[issue](https://github.com/bombsimon/wsl/issues/new) to fix, discuss, change or\nmake something configurable!\n\n## Installation\n\n```sh\n# Latest release\ngo install github.com/bombsimon/wsl/v4/cmd/wsl@latest\n\n# Main branch\ngo install github.com/bombsimon/wsl/v4/cmd/wsl@master\n```\n\n## Usage\n\n`wsl` uses the [analysis](https://pkg.go.dev/golang.org/x/tools/go/analysis)\npackage meaning it will operate on package level with the default analysis flags\nand way of working.\n\n```sh\nwsl --help\nwsl [flags] \u003c/path/to/package/...\u003e\n\nwsl --allow-cuddle-declarations --fix ./...\n```\n\n`wsl` is also integrated in [`golangci-lint`](https://golangci-lint.run)\n\n```sh\ngolangci-lint run --no-config --disable-all --enable wsl --fix\n```\n\n\u003e **Note**: If you're not sure what the diagnostic is trying to tell you, use\n\u003e any of the fix approaches to fix the code for you.\n\n## Issues and configuration\n\nThe linter suppers a few ways to configure it to satisfy more than one kind of\ncode style. These settings could be set either with flags or with YAML\nconfiguration if used via `golangci-lint`.\n\nThe supported configuration can be found [in the\ndocumentation](doc/configuration.md).\n\nBelow are the available checklist for any hit from `wsl`. If you do not see any,\nfeel free to raise an [issue](https://github.com/bombsimon/wsl/issues/new).\n\n* [Anonymous switch statements should never be cuddled](doc/rules.md#anonymous-switch-statements-should-never-be-cuddled)\n* [Append only allowed to cuddle with appended value](doc/rules.md#append-only-allowed-to-cuddle-with-appended-value)\n* [Assignments should only be cuddled with other assignments](doc/rules.md#assignments-should-only-be-cuddled-with-other-assignments)\n* [Block should not end with a whitespace (or comment)](doc/rules.md#block-should-not-end-with-a-whitespace-or-comment)\n* [Block should not start with a whitespace](doc/rules.md#block-should-not-start-with-a-whitespace)\n* [Case block should end with newline at this size](doc/rules.md#case-block-should-end-with-newline-at-this-size)\n* [Branch statements should not be cuddled if block has more than two lines](doc/rules.md#branch-statements-should-not-be-cuddled-if-block-has-more-than-two-lines)\n* [Declarations should never be cuddled](doc/rules.md#declarations-should-never-be-cuddled)\n* [Defer statements should only be cuddled with expressions on same variable](doc/rules.md#defer-statements-should-only-be-cuddled-with-expressions-on-same-variable)\n* [Expressions should not be cuddled with blocks](doc/rules.md#expressions-should-not-be-cuddled-with-blocks)\n* [Expressions should not be cuddled with declarations or returns](doc/rules.md#expressions-should-not-be-cuddled-with-declarations-or-returns)\n* [For statement without condition should never be cuddled](doc/rules.md#for-statement-without-condition-should-never-be-cuddled)\n* [For statements should only be cuddled with assignments used in the iteration](doc/rules.md#for-statements-should-only-be-cuddled-with-assignments-used-in-the-iteration)\n* [Go statements can only invoke functions assigned on line above](doc/rules.md#go-statements-can-only-invoke-functions-assigned-on-line-above)\n* [If statements should only be cuddled with assignments](doc/rules.md#if-statements-should-only-be-cuddled-with-assignments)\n* [If statements should only be cuddled with assignments used in the if statement itself](doc/rules.md#if-statements-should-only-be-cuddled-with-assignments-used-in-the-if-statement-itself)\n* [If statements that check an error must be cuddled with the statement that assigned the error](doc/rules.md#if-statements-that-check-an-error-must-be-cuddled-with-the-statement-that-assigned-the-error)\n* [Only cuddled expressions if assigning variable or using from line above](doc/rules.md#only-cuddled-expressions-if-assigning-variable-or-using-from-line-above)\n* [Only one cuddle assignment allowed before defer statement](doc/rules.md#only-one-cuddle-assignment-allowed-before-defer-statement)\n* [Only one cuddle assignment allowed before for statement](doc/rules.md#only-one-cuddle-assignment-allowed-before-for-statement)\n* [Only one cuddle assignment allowed before go statement](doc/rules.md#only-one-cuddle-assignment-allowed-before-go-statement)\n* [Only one cuddle assignment allowed before if statement](doc/rules.md#only-one-cuddle-assignment-allowed-before-if-statement)\n* [Only one cuddle assignment allowed before range statement](doc/rules.md#only-one-cuddle-assignment-allowed-before-range-statement)\n* [Only one cuddle assignment allowed before switch statement](doc/rules.md#only-one-cuddle-assignment-allowed-before-switch-statement)\n* [Only one cuddle assignment allowed before type switch statement](doc/rules.md#only-one-cuddle-assignment-allowed-before-type-switch-statement)\n* [Ranges should only be cuddled with assignments used in the iteration](doc/rules.md#ranges-should-only-be-cuddled-with-assignments-used-in-the-iteration)\n* [Return statements should not be cuddled if block has more than two lines](doc/rules.md#return-statements-should-not-be-cuddled-if-block-has-more-than-two-lines)\n* [Short declarations should cuddle only with other short declarations](doc/rules.md#short-declaration-should-cuddle-only-with-other-short-declarations)\n* [Switch statements should only be cuddled with variables switched](doc/rules.md#switch-statements-should-only-be-cuddled-with-variables-switched)\n* [Type switch statements should only be cuddled with variables switched](doc/rules.md#type-switch-statements-should-only-be-cuddled-with-variables-switched)\n","funding_links":[],"categories":["Go","Programming Languages"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbombsimon%2Fwsl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbombsimon%2Fwsl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbombsimon%2Fwsl/lists"}