Skip to content

Commit

Permalink
doc: update coding guideline to suggest to place local imports last
Browse files Browse the repository at this point in the history
It seems very common in other Go based projects to place the local
packages in the import statement last. Currently Ceph-CSI expects the
imports to group the local packages immediately after standard packages.
This exception compared to other projects often requires new
contributors to 'correct' their PR.

Following a more common convention for grouping imports should make it a
little easier to contribute to the project.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
  • Loading branch information
nixpanic authored and mergify[bot] committed Jul 23, 2024
1 parent 141da9a commit dce8561
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/coding.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ the code and will be pointed out in the review process:

### Imports

We use the following convention for specifying imports:
We prefer the following convention for specifying imports:

```
<import standard library packages>
<import ceph-csi packages>
<import third-party packages>
<import ceph-csi packages>
```

Example:
Expand All @@ -37,9 +37,9 @@ import (
"strings"
"time"

"github.com/ceph/ceph-csi/internal/util"

"github.com/pborman/uuid"

"github.com/ceph/ceph-csi/internal/util"
)
```

Expand Down

0 comments on commit dce8561

Please sign in to comment.