“Software is easy to write, hard to debug, impossible to maintain.”
Automatically make sure that you didn’t break stuff by writing tests.
Emacs lisp in particular:
- ancient
- quirky
;; See https://magit.vc/manual/magit-section.html | |
(defun magit-test-section () | |
(interactive) | |
;; create a new buffer | |
(with-current-buffer (get-buffer-create "*magit-test-section*") | |
;; trigger the magit section mode | |
(magit-section-mode) | |
;; deactivate the buffer read-only mode temporarily |
Listing pods with kubectl get pods
, then select a pod name and copy paste it into kubectl logs [pod name]
(defun echo-function (&optional args) | |
(interactive | |
(list (transient-args 'test-transient-command))) | |
(message "echo %s" args)) | |
(define-infix-argument test-transient:--message () | |
:description "Message" | |
:class 'transient-option | |
:shortarg "-m" |
(require 'flycheck) | |
;; checkout https://www.macs.hw.ac.uk/~rs46/posts/2018-12-29-textlint-flycheck.html | |
;; | |
;; sudo npm install -g textlint write-good textlint-plugin-latex textlint-rule-write-good textlint-rule-no-start-duplicated-conjunction textlint-rule-max-comma textlint-rule-terminology textlint-rule-period-in-list-item textlint-rule-unexpanded-acronym textlint-rule-abbr-within-parentheses textlint-rule-alex textlint-rule-common-misspellings textlint-rule-en-max-word-count textlint-rule-diacritics textlint-rule-stop-words | |
(flycheck-define-checker textlint | |
"A linter for textlint." | |
:command ("textlint" | |
;; "--config" "/home/abrochard/.emacs.d/.textlintrc" |