fix: lint issues · charmbracelet/vhs@ce7286f (original) (raw)
`@@ -256,7 +256,7 @@ func (p *Parser) parseRepeat() string {
`
256
256
``
257
257
`// parseTime parses a time argument.
`
258
258
`//
`
259
``
`-
// [ms]
`
``
259
`+
// [ms]
`
260
260
`func (p *Parser) parseTime() string {
`
261
261
`var t string
`
262
262
``
`@@ -282,10 +282,10 @@ func (p *Parser) parseTime() string {
`
282
282
`// parseCtrl parses a control command.
`
283
283
`// A control command takes one or multiples characters and/or modifiers to type while ctrl is held down.
`
284
284
`//
`
285
``
`-
// Ctrl[+Alt][+Shift]+
`
286
``
`-
// E.g:
`
287
``
`-
// Ctrl+Shift+O
`
288
``
`-
// Ctrl+Alt+Shift+P
`
``
285
`+
// Ctrl[+Alt][+Shift]+
`
``
286
`+
// E.g:
`
``
287
`+
// Ctrl+Shift+O
`
``
288
`+
// Ctrl+Alt+Shift+P
`
289
289
`func (p *Parser) parseCtrl() Command {
`
290
290
`var args []string
`
291
291
``
`@@ -344,7 +344,7 @@ func (p *Parser) parseCtrl() Command {
`
344
344
`// parseAlt parses an alt command.
`
345
345
`// An alt command takes a character to type while the modifier is held down.
`
346
346
`//
`
347
``
`-
// Alt+
`
``
347
`+
// Alt+
`
348
348
`func (p *Parser) parseAlt() Command {
`
349
349
`if p.peek.Type == token.PLUS {
`
350
350
`p.nextToken()
`
`@@ -366,11 +366,11 @@ func (p *Parser) parseAlt() Command {
`
366
366
`// parseShift parses a shift command.
`
367
367
`// A shift command takes one character and types while shift is held down.
`
368
368
`//
`
369
``
`-
// Shift+
`
370
``
`-
// E.g.
`
371
``
`-
// Shift+A
`
372
``
`-
// Shift+Tab
`
373
``
`-
// Shift+Enter
`
``
369
`+
// Shift+
`
``
370
`+
// E.g.
`
``
371
`+
// Shift+A
`
``
372
`+
// Shift+Tab
`
``
373
`+
// Shift+Enter
`
374
374
`func (p *Parser) parseShift() Command {
`
375
375
`if p.peek.Type == token.PLUS {
`
376
376
`p.nextToken()
`
`@@ -392,7 +392,7 @@ func (p *Parser) parseShift() Command {
`
392
392
`// parseKeypress parses a repeatable and time adjustable keypress command.
`
393
393
`// A keypress command takes an optional typing speed and optional count.
`
394
394
`//
`
395
``
`-
// Key[@
`
``
395
`+
// Key[@
`
396
396
`func (p *Parser) parseKeypress(ct token.Type) Command {
`
397
397
`cmd := Command{Type: CommandType(ct)}
`
398
398
`cmd.Options = p.parseSpeed()
`
`@@ -403,7 +403,7 @@ func (p *Parser) parseKeypress(ct token.Type) Command {
`
403
403
`// parseOutput parses an output command.
`
404
404
`// An output command takes a file path to which to output.
`
405
405
`//
`
406
``
`-
// Output
`
``
406
`+
// Output
`
407
407
`func (p *Parser) parseOutput() Command {
`
408
408
`cmd := Command{Type: token.OUTPUT}
`
409
409
``
`@@ -430,7 +430,7 @@ func (p *Parser) parseOutput() Command {
`
430
430
`// parseSet parses a set command.
`
431
431
`// A set command takes a setting name and a value.
`
432
432
`//
`
433
``
`-
// Set
`
``
433
`+
// Set
`
434
434
`func (p *Parser) parseSet() Command {
`
435
435
`cmd := Command{Type: token.SET}
`
436
436
``
`@@ -525,7 +525,7 @@ func (p *Parser) parseSet() Command {
`
525
525
`// parseSleep parses a sleep command.
`
526
526
`// A sleep command takes a time for how long to sleep.
`
527
527
`//
`
528
``
`-
// Sleep
`
``
528
`+
// Sleep
`
529
529
`func (p *Parser) parseSleep() Command {
`
530
530
`cmd := Command{Type: token.SLEEP}
`
531
531
`cmd.Args = p.parseTime()
`
`@@ -534,17 +534,15 @@ func (p *Parser) parseSleep() Command {
`
534
534
``
535
535
`// parseHide parses a Hide command.
`
536
536
`//
`
537
``
`-
// Hide
`
538
``
`-
// ...
`
``
537
`+
// Hide
`
539
538
`func (p *Parser) parseHide() Command {
`
540
539
`cmd := Command{Type: token.HIDE}
`
541
540
`return cmd
`
542
541
`}
`
543
542
``
544
543
`// parseRequire parses a Require command.
`
545
544
`//
`
546
``
`-
// ...
`
547
``
`-
// Require
`
``
545
`+
// Require
`
548
546
`func (p *Parser) parseRequire() Command {
`
549
547
`cmd := Command{Type: token.REQUIRE}
`
550
548
``
`@@ -560,8 +558,7 @@ func (p *Parser) parseRequire() Command {
`
560
558
``
561
559
`// parseShow parses a Show command.
`
562
560
`//
`
563
``
`-
// ...
`
564
``
`-
// Show
`
``
561
`+
// Show
`
565
562
`func (p *Parser) parseShow() Command {
`
566
563
`cmd := Command{Type: token.SHOW}
`
567
564
`return cmd
`
`@@ -570,7 +567,7 @@ func (p *Parser) parseShow() Command {
`
570
567
`// parseType parses a type command.
`
571
568
`// A type command takes a string to type.
`
572
569
`//
`
573
``
`-
// Type "string"
`
``
570
`+
// Type "string"
`
574
571
`func (p *Parser) parseType() Command {
`
575
572
`cmd := Command{Type: token.TYPE}
`
576
573
``
`@@ -603,7 +600,7 @@ func (p *Parser) parseType() Command {
`
603
600
`// parseCopy parses a copy command
`
604
601
`// A copy command takes a string to the clipboard
`
605
602
`//
`
606
``
`-
// Copy "string"
`
``
603
`+
// Copy "string"
`
607
604
`func (p *Parser) parseCopy() Command {
`
608
605
`cmd := Command{Type: token.COPY}
`
609
606
``
`@@ -632,7 +629,7 @@ func (p *Parser) parseCopy() Command {
`
632
629
`// parsePaste parses paste command
`
633
630
`// Paste Command the string from the clipboard buffer.
`
634
631
`//
`
635
``
`-
// Paste
`
``
632
`+
// Paste
`
636
633
`func (p *Parser) parsePaste() Command {
`
637
634
`cmd := Command{Type: token.PASTE}
`
638
635
`return cmd
`
`@@ -641,7 +638,7 @@ func (p *Parser) parsePaste() Command {
`
641
638
`// parseEnv parses Env command
`
642
639
`// Env command takes in a key-value pair which is set.
`
643
640
`//
`
644
``
`-
// Env key "value"
`
``
641
`+
// Env key "value"
`
645
642
`func (p *Parser) parseEnv() Command {
`
646
643
`cmd := Command{Type: token.ENV}
`
647
644
``
`@@ -661,7 +658,7 @@ func (p *Parser) parseEnv() Command {
`
661
658
`// parseSource parses source command.
`
662
659
`// Source command takes a tape path to include in current tape.
`
663
660
`//
`
664
``
`-
// Source
`
``
661
`+
// Source
`
665
662
`func (p *Parser) parseSource() Command {
`
666
663
`cmd := Command{Type: token.SOURCE}
`
667
664
``
`@@ -736,7 +733,7 @@ func (p *Parser) parseSource() Command {
`
736
733
`// parseScreenshot parses screenshot command.
`
737
734
`// Screenshot command takes a file path for storing screenshot.
`
738
735
`//
`
739
``
`-
// Screenshot
`
``
736
`+
// Screenshot
`
740
737
`func (p *Parser) parseScreenshot() Command {
`
741
738
`cmd := Command{Type: token.SCREENSHOT}
`
742
739
``
`@@ -774,7 +771,7 @@ func (p *Parser) nextToken() {
`
774
771
`p.peek = p.l.NextToken()
`
775
772
`}
`
776
773
``
777
``
`-
// Check if a given windowbar type is valid
`
``
774
`+
// Check if a given windowbar type is valid.
`
778
775
`func isValidWindowBar(w string) bool {
`
779
776
`return w == "" ||
`
780
777
`w == "Colorful" || w == "ColorfulRight" ||
`