Skip to content

Commit

Permalink
Add: resolve_symlinks option
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanrdelgado committed Mar 1, 2018
1 parent f85459c commit ca341b1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
5 changes: 4 additions & 1 deletion TodoReview.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ def process(self):
return self.extract(self.files())

def resolve(self, directory):
return os.path.realpath(os.path.expanduser(os.path.abspath(directory)))
if settings.get('resolve_symlinks', True):
return os.path.realpath(os.path.expanduser(os.path.abspath(directory)))
else:
return os.path.expanduser(os.path.abspath(directory))

class Thread(threading.Thread):
def __init__(self, engine, callback):
Expand Down
1 change: 1 addition & 0 deletions TodoReview.sublime-settings
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"*.sublime-workspace",
"*.sublime-project"
],
"resolve_symlinks": true,
"case_sensitive": false,
"render_include_folder": true,
"render_folder_depth": 1,
Expand Down
7 changes: 7 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,13 @@ Though it may be unnecessary for most, I've also included a setting to override
]
```

## Resolve Symlinks
TodoReview tries to resolve symlinks in your projects so the actual file on disk is referenced. This behavior cuts down on a lot of issues related to symlinks being malformed, for instance having a non-existent destination. This might not work with all workflows, for example working with remote servers. For that reason, you are able to set how you want symlinks handled by TodoReview. This is more of an advanced setting, if you aren't getting errors about symlinks, you most likely do not need to change this. The default is `true`.

```javascript
"resolve_symlinks": false
```

## Case Sensitive
By default, searching is not case sensitive. If you would like it to force case, you can add the following to your config. This defaults to `false`.

Expand Down

0 comments on commit ca341b1

Please sign in to comment.