Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server should also search for files when config file has no sources #53

Closed
suoto opened this issue Oct 10, 2019 · 1 comment
Closed
Assignees
Milestone

Comments

@suoto
Copy link
Owner

suoto commented Oct 10, 2019

A JSON config without a sources key should trigger searching for sources under the root URI. right now that only happens with no config file is passed or the config file is not readable.

Main idea is to allow the config files to coordinate search paths.

For example, given the structure below:

<root>
  +-> common_code
  |   '-> src
  |   '-> testbench
  +-> component_a
  |   '-> src
  |   '-> testbench
  '-> some_project
      '-> src
      '-> testbench

The only thing the tool needs to know is where else to search besides the current root URI. That must be achieved by the following some_project/.hdl_checker.config content:

{
    "include": [
        "../common_code/.hdl_checker.config",
        "../component_a/.hdl_checker.config"
    ]
}

The same idea should be applied to included files recursively.

@suoto suoto self-assigned this Oct 23, 2019
@suoto suoto added this to the 0.6.5 milestone Oct 23, 2019
@suoto
Copy link
Owner Author

suoto commented Oct 25, 2019

The only thing the tool needs to know is where else to search besides the current root URI. That must be achieved by the following some_project/.hdl_checker.config content:

{
    "include": [
        "../common_code/.hdl_checker.config",
        "../component_a/.hdl_checker.config"
    ]
}

Actually, the include key could also accept a path a directory in addition to files and interpret those like a new root URI: search for <dir>/.hdl_checker.config and, if that can't be found, search for files:

{
    "include": [
        "../common_code/.hdl_checker.config",
        "../component_a/"
    ]
}

In the above example:

  • ../common_code/.hdl_checker.config should trigger reading the config file. If it can't be found, do nothing except notifying the user
  • ../component_a/ should
    1. Check if ../component_a/.hdl_checker.config exists
    2. If not, search ../component_a/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant