bolt
Releases (12)
-
1.26.0.0 indexed
-
1.25.0.0 unindexed
-
1.24.0.0 unindexed
-
1.23.0.0 unindexed
-
1.22.0.0 unindexed
-
1.21.0.0 unindexed
-
1.20.0.0 unindexed
-
1.19.0.0 unindexed
-
1.18.0.0 unindexed
-
1.17.0.0 unindexed
-
1.12.0.0 invalid
expected a fresh constructor name (duplicate declaration: Ready)
-
1.11.0.0 invalid
expected a fresh constructor name (duplicate declaration: Ready)
Definitions (1,608)
main.bend
- def dispatchwhat a subcommand runs, over the files after it
- def performwhat a parsed line does, done
- def main
src/args.bend
- def widenthe line at the quantity the rest of bolt reads it at (IO.args gives each argument once)
- def args_ofthe arguments of IO.args's line: the program as invoked comes first, and is dropped
- def argvbolt's command line: its arguments, without the program
- def is_cmdwhether a word names a subcommand
- def asks_helpwhether `--help` stands among the words before the first `--` (after it, every word is a file); the search stops at either
- def help_paththe command path `--help` asks about: the first word other than `--help`, when it names a subcommand, else the root's
- def line.atthe line, given whether it asks for `--help`
- def linethe line shake parses: one that asks for `--help` is `help` for its command path, the page `bolt help` prints; any other is itself
- def spec.filesthe files rest, optional, last among positionals
- def version.atthe release, with the short commit in parentheses when it is present
- def versionthe release, and the short commit when the build has one
- def specbolt's program spec
- def parseargv against bolt's spec
- def help_textusage for a command path
- def err_texta parse error as the text the binary prints
- type Cmda subcommand
- def commanda subcommand by its name; the empty name (no subcommand) is `lint`
- type Streamwhere a line that stops puts its text
- type Outwhat a parsed line does: print a text and exit with a code, or run a subcommand over files (which then exits as that command decides)
- def files.atthe files the selected command bound: each command keeps its own bindings, so they are read from the Matched at the end of the selected path, which is the root's own when no subcommand was selected
- def filesthe files a successful parse bound, to the command it selected
- def out.runa successful parse: the version, or the selected command and its files
- def out.fail.ata failed parse, given whether it asked for usage: that usage page, or the error
- def out.faila failed parse: help text, or an error
- def out.donea successful parse, read once for the version flag
- def outwhat a parse result does
src/build_rev.bend
- def textthe short commit id, or empty
src/check.bend
- def rest_linesa message's lines after the first, indented
- def message.ofa message's lines: the first, then the rest indented
- def messagea message: its first line, the rest indented
- def show_alleach diagnostic as a line
- type Runa file checked: its path and the diagnostics bend reported for it, or a file bend could not be run on
- type Outwhat a check prints, line by line, and the code it exits with
- def lines_ofevery run's error lines, in order
- def out.atthe error lines, then `clean` or the count, and the exit code: 1 when there is any error
- def outwhat a check prints and how it exits, from what bend reported for each file
- def print_alleach line printed
- def run_ofa file's run, from the checker's answer for it
- def check_allevery file checked, in order: what bend reported for each
- def performwhat out decided, done (trusted in src/lint.bend): its lines printed, then its code
- def runthe checker over the files given, exiting 1 when any of them had an error (main passes checker/bend.bend's service)
src/codes.bend
- type Entryone rule: the slug bolt.bend names, its code, its group
- def tableevery rule, in group order
- def find.samethis row is the slug
- def findthe row for a slug
- def code.atthe stable code; the slug itself when it is not a rule
- def codethe stable code; the slug itself when it is not a rule
- def group.atthe group; empty when the slug is not a rule
- def groupthe group; empty when the slug is not a rule
- def source.at`bolt(group:slug)`; `bolt` when the slug is not a rule
- def source`bolt(group:slug)`; `bolt` when the slug is not a rule
src/config.bend
- type Levelhow much a finding matters
- type LevelSeta name (a group's or a rule's) at a level
- type Configthe settings, in file order
- def noneno file: the defaults
- def showthe word for a level, as a finding is shown
- def is_erroris it an error?
- def is_offis it off?
- def of_worda level by its word; an unknown word is an error, so a typo shows
- def unquotea string literal's text, its quotes dropped
- def first_strthe first string among the tokens
- type Settinga setting as a bolt.bend writes it: the def's name, the word its body returns, and the line of its `def` (0-based)
- def settinga def's name and the string it returns, at its line, as a setting
- def settings.goevery `def x(): "level"` of a tree
- def settingsevery setting of a bolt.bend's text, in file order
- def levelseach setting as the level it sets its name to
- def parsea bolt.bend's text as a config: its settings, each at its level
- def known.groupsome row of the table has the name as its group
- def known.insome row of the table has the name as its slug or its group
- def unknown.inthe settings, in order, whose name no row of the table has as its slug or its group
- def unknownthe settings, in order, whose name is neither a rule's slug nor a group of the code table
- def dir_of.goa path's directory, with its slash; `` at the top
- def dir_ofa path's directory, with its slash; `` at the top
- def absolutea path from the root: itself when it starts there, otherwise under the working directory
- def home.upthe directories above the innermost one; none above the root
- def home.stepa path's segment read onto the directories before it, innermost first: an empty segment (from `//` or the `/` a directory ends in) and `.` stay where they are, `..` goes up one (never above the root), and a name goes into it
- def home.segsthe directories a path names, innermost first: its segments, split at `/`, each read by `home.step` onto those before it (seg holds the segment being read, reversed)
- def homea directory resolved against the working directory, as the names of the directories from the root to it, innermost first: `sub/../p3/` under `/w/p1` is `[p3, w]`, and `` is the working directory itself
- def rootdirectories, innermost first, as a path from the root ending in `/`
- def chainthe bolt.bend of a resolved directory (innermost first, as `home` gives it) and of each parent up to the root, nearest first: `[p3, w]` is `/w/p3/bolt.bend`, `/w/bolt.bend`, `/bolt.bend`
- def nearestthe first file that was there, parsed; none, the defaults
- def set_level.gothe level a name is set to, when it is; hit: the setting before sets named it, so the search stops there
- def set_levelthe level a name is set to, when it is: the first setting that names it
- def defaulta group's level when nothing sets it
- def opt_ina rule only its own setting turns on: a group setting, or the group's default, would put new findings on projects that never asked for it (`thunk`, `transcong`, and the laws' `coverage` and `closed`, which are a project's policy rather than defects)
- def level.ofthe rule's own setting, else its group's, else the group's default; an opt-in rule's own setting, else off
- def levelthe rule's own setting, else its group's, else the group's default
src/finding.bend
- type Findingwhere (and how far), which rule, what
- type Gradeda finding at the level the project set for its rule
- def show_gradedone line, `path:line:col: level: CODE: message`
src/lazy/lazy.bend
- def stop`a` when c, else what rest gives: the early exit of a search
- def or_elseTrue when a, else what rest gives: `or` that stops at the first True
- def and_thenwhat rest gives when a, else False: `and` that stops at the first False
- def eitherwhat yes gives when c, else what no gives: a pick whose two branches each recurse, only the one taken run
src/lint.bend
- def read.answera file's text as an answer
- def text.answera path's text as an answer: a directory has none, and a file is read
- def answerone question, answered