Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: bombsimon/wsl
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v5.0.0
Choose a base ref
...
head repository: bombsimon/wsl
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v5.1.0
Choose a head ref
  • 2 commits
  • 4 files changed
  • 2 contributors

Commits on Jun 28, 2025

  1. Configuration menu
    Copy the full SHA
    628ebb7 View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2025

  1. Make error checking more laxed (#184)

    Only perform error checking when there's a single comparison with a
    binary operator comparing an error with `nil`. Both `!=` and `==` are
    candidates for cuddling.
    
    These should be cuddled if `err` exist on the line above
    
    ```go
    if err != nil {}
    
    if err == nil {}
    ```
    
    Nothing else should trigger this lint, all of these should be left
    
    ```go
    // More than error checking
    if err != nil || true {}
    
    // Technically an error checking, but we only check for binary
    // operators, not expressions.
    if errors.Is(err, SomeErr) {}
    
    // More than one error checking
    if err != nil || err2 != nil {}
    ```
    
    This also matches [`gofumpt`](https://github.com/mvdan/gofumpt) which
    has this rule:
    
    > No empty lines before a simple error check
    >
    > ```go
    > foo, err := processFoo()
    >
    > if err != nil {
    > 	return err
    > }
    > ```
    >
    > ```go
    > foo, err := processFoo()
    > if err != nil {
    > 	return err
    > }
    > ```
    bombsimon authored Jul 2, 2025
    Configuration menu
    Copy the full SHA
    ebb08fc View commit details
    Browse the repository at this point in the history
Loading