from pathlib import Path
from vint.asset import get_asset_path
from vint.linting.config.config_file_source import ConfigFileSource

PROJECT_CONFIG_FILENAMES = [
    '.vintrc.yaml',
    '.vintrc.yml',
    '.vintrc',
]
VOID_CONFIG_PATH = get_asset_path('void_config.yaml')


class ConfigProjectSource(ConfigFileSource):
    def get_file_path(self, env):
        proj_conf_path = VOID_CONFIG_PATH

        path_list_to_search = [Path(env['cwd'])] + list(Path(env['cwd']).parents)

        for project_path in path_list_to_search:
            for basename in PROJECT_CONFIG_FILENAMES:
                proj_conf_path_tmp = project_path / basename

                if proj_conf_path_tmp.is_file():
                    return proj_conf_path_tmp

        return proj_conf_path

@@ -214,62 +214,8 @@
 ,%0A%5D%0A
-VOID_CONFIG_PATH = get_asset_path('void_config.yaml')%0A
 %0A%0Acl
@@ -303,115 +303,77 @@
     
-proj_conf_path = VOID_CONFIG_PATH%0A%0A        path_list_to_search = %5BPath(env%5B'cwd'%5D)%5D + list(Path(env%5B'cwd'%5D)
+cwd = Path(env%5B'cwd'%5D)%0A        path_list_to_search = %5Bcwd%5D + list(cwd
 .par
@@ -655,23 +655,43 @@
  return 
-proj_conf_path
+get_asset_path('void_config.yaml')
 %0A

optimize ConfigProjectSource (#267)