2019-12-22 02:05:55 +03:00
|
|
|
root = true
|
|
|
|
|
|
|
|
[*]
|
|
|
|
charset = utf-8
|
|
|
|
end_of_line = lf
|
|
|
|
insert_final_newline = true
|
2020-04-05 15:14:19 +03:00
|
|
|
trim_trailing_whitespace = true
|
2019-12-22 02:05:55 +03:00
|
|
|
|
|
|
|
[*.v]
|
|
|
|
indent_style = tab
|
2020-01-11 15:23:47 +03:00
|
|
|
indent_size = 4
|
2020-04-05 15:14:19 +03:00
|
|
|
|
make.bat: fix use of `make.bat` from `v up` (#16348)
* .editorconfig: fix EOL for BAT files
* make.bat: fix use of `make.bat` from `v up`
- use move semantics, instead of replace, for `v` executable updates
- fixes [#16184](https://github.com/vlang/v/issues/16184)
# [why]
`v up` updates the executable by directly calling `make.bat`, awaiting
the result, which keeps an open file handle to it's own executable file.
`make.bat` compiles and, crucially, attempts to directly replace that
`v` executable. But, in WinOS, files with open file handles cannot be
deleted/replaced, so the `make` then fails. The other key point is that,
although WinOS files with open file handles can't be deleted/replaced,
they _can be moved/renamed_.
Thus, the technique that most self-updating WinOS executables use is to
move the current executable to some alternate name (ie, *v_old.exe*) and
then move the newly updated executable to the original location (ie,
*v.exe*). The next invocation of the "original" executable will then run
the updated version.
Note, this technique also works correctly for direct invocations of `make.bat`.
2022-11-07 09:48:08 +03:00
|
|
|
[*.{bat,cmd}]
|
|
|
|
# BAT/CMD ~ DOS/Win requires BAT/CMD files to have CRLF EOLNs
|
|
|
|
end_of_line = crlf
|
|
|
|
|
2020-04-05 15:14:19 +03:00
|
|
|
[*.{yml,yaml}]
|
|
|
|
indent_style = space
|
|
|
|
indent_size = 2
|
|
|
|
|
|
|
|
[*.md]
|
|
|
|
trim_trailing_whitespace = false
|
2022-01-19 03:23:25 +03:00
|
|
|
# lines that are too long will trigger an error in cmd/tools/vcheck-md.v
|
|
|
|
# run v check-md [folder/file] to test markdown files
|
|
|
|
# the longest normal line is specified with this constant:
|
|
|
|
# `too_long_line_length_other = 100`
|
|
|
|
max_line_length = 100
|
2019-12-22 02:05:55 +03:00
|
|
|
|
2020-04-08 16:54:38 +03:00
|
|
|
[*.{txt,out}]
|
2020-04-07 18:52:15 +03:00
|
|
|
insert_final_newline = false
|
|
|
|
|
2021-09-04 14:32:42 +03:00
|
|
|
[{Makefile,GNUmakefile}]
|
2019-12-22 02:05:55 +03:00
|
|
|
indent_style = tab
|