# editorconfig.org
root = true

[*]
indent_style = space
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{html,md,js,css}]
indent_size = 2

[*.py]
indent_size = 4

# Don't correct indentation for sql and yaml files as sometimes want them wrong for tests
[*.{yml,yaml,sql}]
indent_style = unset

# Some specific tests with trailing newlines
# If adding any exceptions here, make sure to add them to .pre-commit-config.yaml as well
[test/fixtures/linter/sqlfluffignore/*/*.sql]
indent_style = unset
trim_trailing_whitespace = unset
insert_final_newline = unset
[test/fixtures/config/inheritance_b/{,nested/}example.sql]
indent_style = unset
trim_trailing_whitespace = unset
insert_final_newline = unset
[trailing_newlines.sql]
indent_style = unset
trim_trailing_whitespace = unset
insert_final_newline = unset
[plugins/sqlfluff-templater-dbt/test/fixtures/dbt/templated_output/macro_in_macro.sql]
indent_style = unset
trim_trailing_whitespace = unset
insert_final_newline = unset
[plugins/sqlfluff-templater-dbt/test/fixtures/dbt/templated_output/{,dbt_utils_0.8.0/}last_day.sql]
indent_style = unset
trim_trailing_whitespace = unset
insert_final_newline = unset
[test/fixtures/linter/indentation_errors.sql,test/fixtures/templater/jinja_d_roundtrip/test.sql]
trim_trailing_whitespace = false

[*.rst]
indent_size = 3
