mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fmt: smarter if condition wrapping (#8201)
This commit is contained in:
@@ -159,9 +159,8 @@ fn (mut vt Vet) vet_file(path string, is_regression_test bool) {
|
||||
// vet_line vets the contents of `line` from `vet.file`.
|
||||
fn (mut vet Vet) vet_line(lines []string, line string, lnumber int) {
|
||||
// Vet public functions
|
||||
if line.starts_with('pub fn') ||
|
||||
(line.starts_with('fn ') && !(line.starts_with('fn C.') || line.starts_with('fn main')))
|
||||
{
|
||||
if line.starts_with('pub fn') || (line.starts_with('fn ') && !(line.starts_with('fn C.')
|
||||
|| line.starts_with('fn main'))) {
|
||||
// Scan function declarations for missing documentation
|
||||
is_pub_fn := line.starts_with('pub fn')
|
||||
if lnumber > 0 {
|
||||
|
||||
Reference in New Issue
Block a user