Problem
Running Optimize Imports or a reformat action that optimizes imports can change indentation in an already-correct namespace form, even when there are no imports or requires to optimize.
This is most visible with Clojure Standard Style formatting, and can leave the :require form progressively less indented after repeated runs.
Example
Starting from:
(ns auto-discovery.resolvers.domain-resolvers-test
(:require [clojure.test :refer [deftest is]]
[cyco-app.resolvers.domain-resolvers :as domain-resolvers]))
Running Optimize Imports/Reformat should leave the namespace form unchanged, but it can reduce the indentation of the second require clause. Repeating the operation can move it further left.
Expected behavior
If the namespace form is already optimized, Optimize Imports should not change its indentation.
Partial formatting of a namespace clause should preserve the same indentation that a full-file format would produce.
Problem
Running Optimize Imports or a reformat action that optimizes imports can change indentation in an already-correct namespace form, even when there are no imports or requires to optimize.
This is most visible with Clojure Standard Style formatting, and can leave the
:requireform progressively less indented after repeated runs.Example
Starting from:
Running Optimize Imports/Reformat should leave the namespace form unchanged, but it can reduce the indentation of the second require clause. Repeating the operation can move it further left.
Expected behavior
If the namespace form is already optimized, Optimize Imports should not change its indentation.
Partial formatting of a namespace clause should preserve the same indentation that a full-file format would produce.