<table><tr><td style="">dhaumann added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D4537" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>Cool, I have some comments, though :-)</p>

<ol class="remarkup-list">
<li class="remarkup-list-item">Optional Dependency
<br /><br />
As you yourself note, please make this an optional dependency: Best is if we could use find_package(editorconfig) or so to make sure it is consistent how we typically also add dependencies. For instance, we use find_package(LibGit2 "0.22.0") in ktexteditor/CMakeLists.txt for the optional dependency on libgit2. Then, later we use #ifdef LIBGIT2_FOUND to optionally use the libgit2 library. We should do the same with editorconfig.</li>
</ol>

<p>Does a find_package module exist here?</p>

<ol class="remarkup-list" start="2">
<li class="remarkup-list-item">Separate Class
<br /><br />
I would prefer to have a standalone class that handles the editorconfig: I.e. a class EditorConfig in a separate cpp/h file. We could pass the Document doc in the EditorConfig(doc) constructor and then let the EditorConfig class do the work. This also has the advantage that we can add unit tests for the EditorConfig class, which is not so easy otherwise.</li>
</ol>

<p>Could you provide an updated patch, or do you need help somewhere?</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R39 KTextEditor</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D4537" rel="noreferrer">https://phabricator.kde.org/D4537</a></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>gszymaszek, KTextEditor<br /><strong>Cc: </strong>dhaumann, kwrite-devel, Frameworks<br /></div>