Git Product home page Git Product logo

ucicheck's Introduction

ucicheck

A basic syntax checker for UCI configuration files.

https://openwrt.org/docs/guide-user/base-system/uci#file_syntax

License

GPLv2-only - http://www.gnu.org/licenses/gpl-2.0.html

Copyright: (C) 2024 Thibaut VARÈNE

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2, as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See LICENSE.md for details

Dependencies

  • A C compiler supporting the C standard library (e.g. gcc)
  • make, flex and bison

Building

To build, run make

Usage

The tool takes a path to a UCI configuration file as argument.

If the syntax is valid, no output is emitted and the tool returns a 0 exit code. Otherwise, error messages are printed and a non-zero exit code is returned.

Usage:

ucicheck [-n] filename

Notes

Due to UCI allowing embedded new lines in quoted literals, unterminated quoted multi-line strings may typically be reported out of sync (or not at all if a subsequent unbalanced closing quote terminates the unbalanced opening one).

In order to help debugging these cases, calling this tool with the -n option switches to a stricter subset of the UCI syntax which does not allow embedded new lines in string literals.

Syntax errors triggered by unexpected NEWLINE usually affect the line prior to the one reported.

ucicheck's People

Contributors

f00b4r0 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.