lines

command module
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2026 License: 0BSD Imports: 3 Imported by: 0

README

lines

lines is a lightweight Go command-line tool built with Cobra that scans source files to find lines exceeding a specific visual width limit. It accurately handles tab characters and can automatically skip function signatures to prevent false positives on boilerplate code.

Features

  • Tab Width Awareness: Measures tab characters (\t) based on their visual column size rather than a single character byte.
  • AST Smart Filtering: Leverages Go's native syntax parser to identify and skip function signatures, anonymous functions, and function-typed struct fields.
  • Fragmented Expression Detection: Identifies expressions (like multi-line calls, assignments, literals, or binary operations) that were broken down into multiple lines but could completely fit within a single line limit.
  • Pipeline Friendly: Seamlessly accepts input from either a file argument or directly via standard input (stdin).

Documentation

Overview

+gocover:ignore:file entry point and only delegates execution

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL