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

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

example/main.dart

/// Analyzes a Fluvie snippet and prints its diagnostics.
///
/// Run it from a directory whose package config resolves `package:fluvie`
/// (a project that depends on fluvie, or this repository's root):
/// `dart run example/main.dart`. The analyzer only inspects the code; the
/// snippet is never compiled to an executable or run.
library;

import 'dart:io';

import 'package:fluvie_validate/fluvie_validate.dart';

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

  // `Scene` takes `children`, so the `child:` below is a deliberate error.
  const snippet = '''
import 'package:fluvie/fluvie.dart';

Video build() => Video(
  size: VideoSize.square,
  scenes: [Scene(duration: 2.seconds, child: null)],
);
''';

  final diagnostics = await analyzer.analyze(snippet);
  for (final diagnostic in diagnostics) {
    stdout.writeln(
      '${diagnostic.severity.name} at ${diagnostic.line}:${diagnostic.column} '
      '${diagnostic.message}',
    );
  }
}
0
likes
130
points
238
downloads

Documentation

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

Funding

Consider supporting this project:

github.com

License

MIT (license)

Dependencies

analyzer, custom_lint_builder, fluvie_lints

More

Packages that depend on fluvie_validate