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
Copy file name to clipboardExpand all lines: docs/build-tool/make.md
-12Lines changed: 0 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -196,7 +196,6 @@ A `Makefile` defines targets called via the `make` command. Each target can run
196
196
197
197
> Practicalli also uses `make` to [configure and build the latest versions of Emacs](https://practical.li/blog/posts/build-emacs-28-on-ubuntu/){target=_blank} and other Linux open source software
198
198
199
-
200
199
## Defining tasks
201
200
202
201
Create a `Makefile` in the root of a project and define a target by typing a suitable name followed by a `:` character, e.g. `test:`
@@ -211,7 +210,6 @@ repl: ## Run Clojure REPL with rich terminal UI (Rebel Readline)
@@ -232,7 +230,6 @@ Targets used across Practicalli projects follow the [make standard targets for u
232
230
233
231
[:fontawesome-brands-github: practicalli/dotfiles/Makefile](https://github.com/practicalli/dotfiles/blob/main/Makefile) also defines docker targets to build and compose images locally, inspect images and prune containers and images.
234
232
235
-
236
233
## Target dependencies
237
234
238
235
A `Makefile` target can depend on either a file name or another target in the `Makefile`.
@@ -247,14 +244,12 @@ Add the filename of a file after the name of the target, to depend on if that fi
247
244
248
245
ClojureCLIExample: If the `deps` target depends on `deps.edn` and the file has not changed since last run, the deps target will not run again.
249
246
250
-
251
247
## deps target - depend on a file
252
248
253
249
The deps target would use Clojure CLI or Leiningen to download dependencies.
254
250
255
251
Configuring the `deps` target to depend on `deps.edn` or `project.clj` file, then if the file has not changed the deps will not run again.
256
252
257
-
258
253
A Clojure CLI example depends on the `deps.edn` file that defines all the library dependencies for the project, tools for testing and packaging the Clojure service. The `-P` flag is the prepare option, a dry run that only downloads the dependencies for the given tasks.
259
254
260
255
```makefile
@@ -265,7 +260,6 @@ deps: deps.edn ## Prepare dependencies for test and dist targets
265
260
266
261
>`:env/test` adds libraries to run Kaocha and libraries used to run unit tests. `:package/uberjar` runs a tool that creates an uberjar.
267
262
268
-
269
263
## Clean target - hiding command failure
270
264
271
265
The clean target should remove files and directories created by the build (compile) process, to ensure a consistent approach to building each time.
@@ -281,7 +275,6 @@ clean:
281
275
- rm -rf ./.cpcache
282
276
```
283
277
284
-
285
278
## MegaLinter target - simplifying a command
286
279
287
280
The `lint` target is an example of how the `Makefile` simplifies the command line interface.
@@ -303,7 +296,6 @@ lint-clean:
303
296
- rm -rf ./megalinter-reports
304
297
```
305
298
306
-
307
299
## Enhancing make output
308
300
309
301
The `info` message is used with each target to enhances the readability of the make output, especially when multiple targets and commands are involved, or if commands are generating excessive output to standard out.
@@ -316,7 +308,6 @@ The `info` message is used with each target to enhances the readability of the m
316
308
317
309

318
310
319
-
320
311
## Avoiding file name collisions
321
312
322
313
Although unlikely, if a filename in the root of a project has the same name as a `Makefile` target, it can be used instead of running the targets command
@@ -329,7 +320,6 @@ Although unlikely, if a filename in the root of a project has the same name as a
`.DELETE_ON_ERROR:` halts any further commands if a command returns non-zero exit status. Useful as short-circuit to stop tasks when further work is not valuable, e.g. if tests fail then it may not be valuable to build the Clojure project.
Copy file name to clipboardExpand all lines: docs/careers/engineering-manager.md
-4Lines changed: 0 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,6 @@ Management roles are there to balance the needs of the organisation with the eng
4
4
5
5
The role naturally focuses on on the larger goals and challenges facing the engineering teams, supporting the engineers to solve specific challenges using their own skills and experiences (that is why they were hired)
6
6
7
-
8
7
## Meetings
9
8
10
9
[one to one](/engineering-playbook/practices/discussions/one-to-one-meeting.md) are regularly held with direct reports and those people the engineering manager reports to, ensuring there is good working relationship between the respective people.
@@ -18,15 +17,13 @@ Engineering team meetings may occasionally be joined to review how effective the
18
17
-[standup](/engineering-playbook/practices/discussions/standup.md) can highlight issues with motivation and team cohesiveness
19
18
-[retrospective](/engineering-playbook/practices/discussions/retrospective.md) can help identify action items that the engineering manager can actively support or help direct others to support
20
19
21
-
22
20
!!! HINT "Performance reviews supported by one-to-one meetings"
23
21
Where performance reviews are applicable, include the review as an aspect to raise with one-to-one meetings with direct reports throughout the year.
24
22
25
23
The need to complete a review should be raised as early as possible in one-to-one meetings and regularly raised (even if only briefly) to ensure supporting tasks are carried out to swiftly complete the review at the appropriate time.
26
24
27
25
Creating regular journal entries can speed up the completion of a self-written performance review submission
28
26
29
-
30
27
## Journal
31
28
32
29
Write regular journal entries and encourage others to do the same by sharing the journal across the organisation (except for private notes)
@@ -35,7 +32,6 @@ Use the knowledge sharing tool for the organisation, e.g. [Atlassian Confluence]
35
32
36
33
> TODO: example jornal, e.g. from Billie & 100 days of code
37
34
38
-
39
35
## Management anti-patters
40
36
41
37
**micro-management** is highly ineffective, demonstrates lack of trust, highlights poor communication and lack of management skills. Shows lack of understanding of the needs of the business and engineering teams.
Copy file name to clipboardExpand all lines: docs/code-quality/clojure.md
-17Lines changed: 0 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,5 @@
1
1
# Clojure Quality tools
2
2
3
-
4
3
## Syntax & Idiom check
5
4
6
5
[clj-kondo](https://github.com/borkdude/clj-kondo/) is a lint tool that highlights syntactic errors and suggests idioms for Clojure, ClojureScript and EDN.
@@ -12,12 +11,10 @@ clj-kondo can also be used as a command line tool for checking projects in devel
12
11
!!! HINT "Clojure LSP includes clj-kondo"
13
12
[Clojure LSP install](clojure-lsp/) includes clj-kondo, removing the need for a separate install of clj-kondo
[Clj-kondo config](https://github.com/clj-kondo/config) contains additional configuration for using clj-kondo with libraries that extend the Clojure language via macros.
19
17
20
-
21
18
### Command Line
22
19
23
20
Run `clj-kondo` with the --lint option and specify a file or path
@@ -34,7 +31,6 @@ Analyse a project, running the clj-kondo command from the root of the project
34
31
clj-kondo --lint .
35
32
```
36
33
37
-
38
34
### GitHub workflow
39
35
40
36
Add clj-kondo linting to continuous integration workflow checks for syntax errors with Clojure files.
@@ -43,7 +39,6 @@ Add clj-kondo linting to continuous integration workflow checks for syntax error
!!! EXAMPLE "Setup Clojure with clj-kondo and cljstyle checks"
48
43
```yaml
49
44
---
@@ -85,11 +80,9 @@ Add clj-kondo linting to continuous integration workflow checks for syntax error
85
80
- run: echo "🍏 Job status is ${{ job.status }}."
86
81
```
87
82
88
-
89
83
??? INFO "Setup clojure-lsp Action"
90
84
[Setup Clojure-LSP](https://github.com/marketplace/actions/setup-clojure-lsp) contains clj-kondo so can also be used within a continuous integration workflow as well as provide .
91
85
92
-
93
86
## Format Check and Fix
94
87
95
88
Code is easier to read and work with when it is consistent format that follows common rules.
@@ -102,13 +95,11 @@ A consistent format between editors also minimises version control changes not r
102
95
*[cljstyle](https://github.com/greglook/cljstyle){target=_blank} - binary and library (re-write of cljfmt)
??? INFO "Tooling that uses the Clojure Style Guide"
107
99
Emacs `clojure-mode` and Clojure LSP (via cljfmt) format code following the most common Clojure style guide rules, although cljfmt rules are quite strick so Practicalli disables many of them.
108
100
109
101
cljstyle default configuration follows the majority of styles and has the same defaults as cljfmt. Practicalli Clojure CLI Config tweaks a few rules to make code more readable and allow for repl design experiments.
110
102
111
-
112
103
### cljstyle
113
104
114
105
Cljstyle is a rewrite of cljfmt, designed to be easier to configure. The default rules implement many of the style rules from the Clojure community style guide and is compatible with cljfmt.
@@ -118,7 +109,6 @@ Call with the `check` option to report formatting issues, providing a coloured d
118
109

119
110

120
111
121
-
122
112
Call with `fix` option to automatically update all Clojure files with fixes, indicating which files have changed.
123
113
124
114
Cljstyle will examine all files in the current directory and any sub-directories.
@@ -141,7 +131,6 @@ Cljstyle will examine all files in the current directory and any sub-directories
141
131
cljstyle fix
142
132
```
143
133
144
-
145
134
=== "Practicalli Clojure CLI Config"
146
135
cljstyle can be used as a library without installing the cljstyle binary. [Practicalli Clojure CLI Config](/clojure/clojure-cli/practicalli-config/) defines the `:format/cljstyle` alias which should be passed wither the `check` or `format` option
147
136
@@ -191,7 +180,6 @@ Cljstyle will examine all files in the current directory and any sub-directories
191
180
!!! HINT "Stage changes before automatically fixing format"
192
181
Practicalli suggests staging (or committing) changes before running `cljstyle fix` to easily undo undesired changes or simply confirm what changes have been made
193
182
194
-
195
183
!!! EXAMPLE "Practicall configuration"
196
184
Practicalli updated the default cljstyle configuration with the following changes
197
185
@@ -212,7 +200,6 @@ Cljstyle will examine all files in the current directory and any sub-directories
212
200
{:enabled? false}
213
201
```
214
202
215
-
216
203
### cljfmt
217
204
218
205
cljfmt is not available as a separate binary, although it a fixed part of the Clojure LSP server implementation.
@@ -236,7 +223,6 @@ Or specify cljfmt configuration within the Clojure LSP configuration file
236
223
237
224
The default cljfmt rules feel overly strict and Practicalli configuration disables the more draconian rules to make code far more readable
238
225
239
-
240
226
### zprint
241
227
242
228
zprint is a highly configurable format tool for both Clojure code and Clojure/EDN structures, available as a library and command line tool
@@ -245,7 +231,6 @@ zprint has advanced features over cljstyle and cljfmt, although may require some
245
231
246
232
[zprint available styles](https://github.com/kkinnear/zprint/blob/main/doc/reference.md#style-and-style-map){target=_blank .md-button}
247
233
248
-
249
234
??? WARNING "No built-in diff option"
250
235
zprint requires an external diff tool to see the format changes made, as zprint only reports on the files changed and not the content of those files that has changed.
251
236
@@ -288,7 +273,6 @@ zprint has advanced features over cljstyle and cljfmt, although may require some
288
273
zprint -lfsw **/*.clj *.edn *.clj
289
274
```
290
275
291
-
292
276
=== "Practicalli Clojure CLI Config"
293
277
zprint can be used as a library without installing the binary. [Practicalli Clojure CLI Config](/clojure/clojure-cli/practicalli-config/) defines the `:format/zprint` alias which checks the format of a file and reports which files required
294
278
@@ -339,7 +323,6 @@ zprint has advanced features over cljstyle and cljfmt, although may require some
339
323
340
324
`$HOME/.zprintrc` is used for the configuration applied to all files, although this can be overridden in each project (or even as zprint comments in particular files)
Copy file name to clipboardExpand all lines: docs/code-quality/index.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,12 +9,10 @@ Those same tools can check important quality rules when sharing code via continu
9
9
10
10
The development team should agree on the rules that are valueable for these tools to apply, including those recommended by the community around the programming language or configuration file specification.
11
11
12
-
13
12
## Recommended Tools
14
13
15
14
MegaLinter provides an extensive range of lint tools all in one, using docker images to remove tool installation requirements.
16
15
17
16
[MegaLinter - extensive collection of lint tools](megalinter.md){target=_blank .md-button}
Copy file name to clipboardExpand all lines: docs/code-quality/megalinter.md
+2-7Lines changed: 2 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,6 @@ Supported Linters have their own page listing the lint and format tools it provi
13
13
14
14
MegaLinter run via a GitHub workflow has no requirements
15
15
16
-
17
16
## MegaLinter Locally
18
17
19
18
The most effective way to manage lint and format issues is to run MegaLinter locally, before pushing changes to a Continuous Integration service.
@@ -24,7 +23,6 @@ Install a recent version of [:globe_with_meridians: Node.js](https://nodejs.org/
24
23
25
24
> `npx mega-linter-runner` runs MegaLinter without the need for a specific npm install.
26
25
27
-
28
26
### Create a configuration
29
27
30
28
!!! HINT "Use the Practicalli MegaLinter Configuration"
@@ -69,7 +67,6 @@ Use the `--fix` option with the local MegaLinter runner to automatically apply l
69
67
??? HINT "Stage or Commit changes before MegaLinter runner automatic fix"
70
68
If code and configuration changes are staged or committed before running with `--fix` then automatic fixes can easily be discarded or treated as a separate commit using any Git tool.
0 commit comments