[polari/ci: 2/3] build: Syntax-check javascript sources



commit 0c7d328bed0d4a554d11732cc0319f650b82edb4
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Oct 18 21:29:17 2017 +0200

    build: Syntax-check javascript sources

 meson.build     | 1 +
 src/meson.build | 4 ++++
 2 files changed, 5 insertions(+)
---
diff --git a/meson.build b/meson.build
index c0bd207..852d01c 100644
--- a/meson.build
+++ b/meson.build
@@ -28,6 +28,7 @@ girdir = join_paths(pkgdatadir, 'gir-1.0')
 typelibdir = join_paths(pkglibdir, 'girepository-1.0')
 
 gjs_console = find_program('gjs')
+js52 = find_program('js52')
 
 desktop_file_validate = find_program('desktop-file-validate', required: false)
 appstream_util = find_program('appstream-util', required: false)
diff --git a/src/meson.build b/src/meson.build
index c0242d2..004b4cf 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -44,6 +44,10 @@ js_sources = [
 js_xml = []
 foreach js_source : js_sources
   js_xml += '    <file>@0@</file>'.format(js_source)
+
+  test('Syntax check ' + js_source, js52,
+    args: ['-s', '-c', js_source],
+    workdir: meson.current_source_dir())
 endforeach
 
 resource_data = configuration_data()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]