Skip CI on comment/whitespace only changes
- Dominant language
- F#
- Stars
- 4.3k
- Forks
- 876
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 131
Description
Thanks! I wonder if we somehow can utilise fantomas (or its libraries) to check whether if the changes are in docs, and don't run full CI suite? We do it already for markdown changes.
_Originally posted by @vzarytovskii in https://github.com/dotnet/fsharp/issues/16453#issuecomment-1864339136_
I created fsx script that will tokenize changed files and check is changed lines contain only comments or whitespace.
https://gist.github.com/OwnageIsMagic/541c8abbd435cf82b1aacc250e24f54c
`dotnet fsi check.fsx -- @^ ; echo $?`
upd: there is a lot of false negatives from patches like
```diff
@@ -209,0 +210 @@
+(*
@@ -223,0 +225 @@
+*)
```
Patch only changed comment line, but it affects all lines after it.
Another approach I would try is to zip two token streams and check if they contain same sequence of comment/non-comment tokens.
Contributor guide
Assessment
This issue has not been assessed yet.