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: vignettes/automatic_fixes.Rmd
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -18,28 +18,28 @@ knitr::opts_chunk$set(
18
18
library(flir)
19
19
```
20
20
21
-
The main feature of `flir` is that it can provide automatic fixes for some linters.
21
+
The main feature of `flir` is that it can provide automatic fixes for some linters.
22
22
This is very useful to avoid the tedious job of fixing many files by hand but you may be worried about it applying wrong fixes.
23
23
Moreover, since those fixes can be applied to several files at once, going back in time before those fixes were applied can be very difficult.
24
24
`flir` provides two mechanisms to be more confident about automated fixes.
25
25
26
26
## Use Git
27
27
28
-
By default, if `flir` would automatically fix several files and the project doesn't use Git for version control, a menu will appear recommending you to use Git.
28
+
By default, if `flir` would automatically fix several files and the project doesn't use Git for version control, a menu will appear recommending you to use Git.
29
29
At this stage, you can still decide whether you want to apply the fixes or stop here without changing anything.
30
30
31
-
Git makes it much easier to see changed files and it is therefore very recommended to use it in combination with `flir`.
32
-
Similarly, if some files are unstaged (meaning that they have changes not covered by Git yet), another menu will ask you to confirm that you want to apply fixes.
31
+
Git makes it much easier to see changed files and it is therefore very recommended to use it in combination with `flir`.
32
+
Similarly, if some files are unstaged (meaning that they have changes not covered by Git yet), another menu will ask you to confirm that you want to apply fixes.
33
33
The reason is that for those unstaged files, it may be difficult to distinguish the new changes introduced by automated fixes from previous, unsaved changes.
34
34
35
35
## Interactively review all fixes
36
36
37
-
Whether you use Git or not, you can also opt in for interactive review of changes using the `interactive` parameter in most of the `fix_*()` functions.
38
-
Setting `interactive = TRUE` will open a Shiny application enabling you to see all the changes that *would be* introduced by `flir`.
39
-
Those changes are not applied yet: you can decide whether you want to apply them or to skip them.
37
+
Whether you use Git or not, you can also opt in for interactive review of changes using the `interactive` parameter in most of the `fix_*()` functions.
38
+
Setting `interactive = TRUE` will open a Shiny application enabling you to see all the changes that *would be* introduced by `flir`.
39
+
Those changes are not applied yet: you can decide whether you want to apply them or to skip them.
40
40
If you have several files to review, accepting or skipping the changes for one file will automatically go to the next file.
41
41
42
-
The video below shows that I have two files, `foo1.R` and `foo2.R`, both of which would be modified by automated fixes.
42
+
The video below shows that I have two files, `foo1.R` and `foo2.R`, both of which would be modified by automated fixes.
43
43
Using `interactive = TRUE` allows me to decide whether I actually want fixes to be applied or not:
44
44
45
45

0 commit comments