• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

type-ruby / t-ruby / 20573122825
92%

Build:
DEFAULT BRANCH: main
Ran 29 Dec 2025 12:41PM UTC
Jobs 1
Files 86
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Dec 2025 12:41PM UTC coverage: 92.341% (+13.3%) from 79.076%
20573122825

push

github

web-flow
feat: improve error messages with tsc-style diagnostics (#30)

* feat: add Diagnostic class for unified error structure

- Add Diagnostic class with code, message, file, line, column attributes
- Add factory methods: from_type_check_error, from_parse_error, from_scan_error
- Add comprehensive tests for all functionality
- TR1xxx codes for parser errors, TR2xxx for type errors

* feat: add DiagnosticFormatter with tsc-style output

- Format errors as file:line:col - severity CODE: message
- Display source code snippets with line numbers
- Show error markers (~~~) under problem location
- Include Expected/Actual/Suggestion context
- Support ANSI colors with TTY auto-detection
- Format summary line: Found X errors and Y warnings

* feat: add ErrorReporter for collecting and reporting errors

- Collect multiple diagnostics during compilation
- Convert TypeCheckError, ParseError, ScanError to Diagnostic
- Auto-load source from file when not provided
- Report formatted output using DiagnosticFormatter
- Track error vs warning counts

* feat: integrate ErrorReporter into CLI

- Use ErrorReporter for TypeCheckError, ParseError, ScanError
- Display tsc-style formatted error output
- Include source code snippets and error markers
- Show Expected/Actual/Suggestion context
- Display summary line with error count

* refactor: use DiagnosticFormatter in Watcher

- Replace hash-based error format with Diagnostic objects
- Use DiagnosticFormatter for consistent tsc-style output
- Include source code snippets in watch mode errors
- Update tests to expect Diagnostic objects

* feat: add location info to MethodDef for better error messages

- TokenDeclarationParser: capture def token's line/column
- Parser.parse_function_with_body: add line/column to func_info
- Parser.parse_method_in_class: add line/column to method_info
- IR CodeGenerator.build_method: pass location to MethodDef

Error messages now show exact line:column position:
  src/file.trb:18:1 - error TR2001: T... (continued)

571 of 640 new or added lines in 14 files covered. (89.22%)

4 existing lines in 2 files now uncovered.

8210 of 8891 relevant lines covered (92.34%)

1046.45 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
97.73
lib/t_ruby/diagnostic.rb
1
97.45
25.68% lib/t_ruby/lsp_server.rb
2
85.47
48.17% lib/t_ruby/watcher.rb
3
90.56
2.49% lib/t_ruby/compiler.rb
3
96.55
lib/t_ruby/diagnostic_formatter.rb
4
93.6
3.3% lib/t_ruby/error_handler.rb
9
90.15
14.57% lib/t_ruby/cache.rb
46
86.32
2.86% lib/t_ruby/parser_combinator/token/token_declaration_parser.rb

Uncovered Existing Lines

Lines Coverage ∆ File
2
93.6
3.3% lib/t_ruby/error_handler.rb
2
86.32
2.86% lib/t_ruby/parser_combinator/token/token_declaration_parser.rb
Jobs
ID Job ID Ran Files Coverage
1 20573122825.1 29 Dec 2025 12:41PM UTC 86
92.34
GitHub Action Run
Source Files on build 20573122825
  • Tree
  • List 86
  • Changed 37
  • Source Changed 11
  • Coverage Changed 37
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #20573122825
  • 7ad4cf4a on github
  • Prev Build on main (#20560974963)
  • Next Build on main (#20574403175)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc