Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
v0.12.10

- Add `display_exclude_patterns` and `index_exclude_patterns` properties to allow excluding files from display and search indexing. (Fixes #228)
- Add tests for new properties.
- Make path splitting algorithm UNC-aware (#135)
- Update utarray.h to 2.3.0 (#137)
- Miscellaneous fixes.
Expand Down
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,18 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/tests/CMakeLists.txt)
# rather than an executable file named "editorconfig_bin".
# Used by tests/CMakeLists.txt.
add_subdirectory(tests)

# Test for new exclude properties - display_exclude_patterns
add_test(NAME exclude_properties_display_test
COMMAND editorconfig_bin -f ${CMAKE_CURRENT_SOURCE_DIR}/test_exclude/.editorconfig ${CMAKE_CURRENT_SOURCE_DIR}/test_exclude/dummy.txt
)
set_tests_properties(exclude_properties_display_test PROPERTIES PASS_REGULAR_EXPRESSION "display_exclude_patterns=\*\.min\.js, \*\.log")

# Test for new exclude properties - index_exclude_patterns
add_test(NAME exclude_properties_index_test
COMMAND editorconfig_bin -f ${CMAKE_CURRENT_SOURCE_DIR}/test_exclude/.editorconfig ${CMAKE_CURRENT_SOURCE_DIR}/test_exclude/dummy.txt
)
set_tests_properties(exclude_properties_index_test PROPERTIES PASS_REGULAR_EXPRESSION "index_exclude_patterns=\*\.o, build/")
message(STATUS "Tests enabled")
else()
message(WARNING
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ Hong Xu
Ralf Habacker
Trey Hunner
William Swanson
shaidshark
2 changes: 2 additions & 0 deletions include/editorconfig/editorconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@
* <li><strong>trim_trailing_whitespace</strong>: set to "true" to remove any whitespace characters preceding newline characters and "false" to ensure it doesn't.</li>
* <li><strong>insert_final_newline</strong>: set to "true" ensure file ends with a newline when saving and "false" to ensure it doesn't.</li>
* <li><strong>root</strong>: special property that should be specified at the top of the file outside of any sections. Set to "true" to stop <code>.editorconfig</code> files search on current file. The value is case insensitive.</li>
* <li><strong>display_exclude_patterns</strong>: a comma-separated list of glob patterns specifying files and directories that should not be displayed in file trees or project views. Patterns are matched using the same rules as section names. This property is typically set in the <code>[*]</code> section to apply globally.</li>
* <li><strong>index_exclude_patterns</strong>: a comma-separated list of glob patterns specifying files and directories that should not be indexed or included in search results. Patterns are matched using the same rules as section names. This property is typically set in the <code>[*]</code> section to apply globally.</li>
* </ul>
*
* For any property, a value of "unset" is to remove the effect of that
Expand Down
3 changes: 3 additions & 0 deletions test_exclude/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[*]
display_exclude_patterns = *.min.js, *.log
index_exclude_patterns = *.o, build/
1 change: 1 addition & 0 deletions test_exclude/dummy.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is a dummy file.
Loading