fluvie_validate 0.1.9 copy "fluvie_validate: ^0.1.9" to clipboard
fluvie_validate: ^0.1.9 copied to clipboard

Static validation for Fluvie composition code: analyzer diagnostics plus the fluvie_lints rules, run in-process and never executing the code.

fluvie_validate #

Static validation for Fluvie composition code. It resolves a snippet against package:fluvie and reports the compiler diagnostics plus the fluvie_lints rules. It analyzes only: it never compiles the code to an executable or runs it, so validating an untrusted snippet is safe.

pub package license: MIT

Usage #

import 'dart:io';

import 'package:fluvie_validate/fluvie_validate.dart';

Future<void> main() async {
  final analyzer = FluvieCodeAnalyzer(projectRoot: Directory.current);

  final diagnostics = await analyzer.analyze('''
import 'package:fluvie/fluvie.dart';

Video build() => Video(scenes: const []);
''');

  if (diagnostics.isEmpty) {
    stderr.writeln('No problems.');
  } else {
    for (final diagnostic in diagnostics) {
      stderr.writeln(diagnostic);
    }
  }
}

projectRoot is any directory whose package resolution can see package:fluvie (the workspace root works). This package backs the validate path in fluvie_server and the Fluvie Playground.

0
likes
120
points
228
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Static validation for Fluvie composition code: analyzer diagnostics plus the fluvie_lints rules, run in-process and never executing the code.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#video #analysis #validation #linter

License

MIT (license)

Dependencies

analyzer, custom_lint_builder, fluvie, fluvie_lints

More

Packages that depend on fluvie_validate