Ability to process exclude array with regex
alanhamlett opened this issue · 1 comments
alanhamlett commented
An error is displayed when opening Settings Form and ~/.wakatime.cfg
contents:
[settings]
exclude =
^/var/
^/tmp/
^/private/
COMMIT_EDITMSG$
PULLREQ_EDITMSG$
MERGE_MSG$
Config file parser should support regex values in exclude
and other INI lists.
Ide.log
WARNING [2017-05-31 22:31:30Z]: [Wakatime HandledException 10:31:30 PM] Error when loading form SettingsForm:: System.TypeInitializationException: The type initializer for 'WakaTime.WakaTimeConfigFile' threw an exception. ---> IniParser.Exceptions.ParsingException: Unknown file format. Couldn't parse the line: '^/var/'. while parsing line number 0 with value '' - IniParser version: 2.2.4.0 while parsing line number 7 with value ' ^/var/' - IniParser version: 2.2.4.0 ---> IniParser.Exceptions.ParsingException: Unknown file format. Couldn't parse the line: '^/var/'. while parsing line number 0 with value '' - IniParser version: 2.2.4.0
at IniParser.Parser.IniDataParser.ProcessLine (System.String currentLine, IniParser.Model.IniData currentIniData) [0x0007e] in <a4428ae829914046a49c26dc22f3ce69>:0
at IniParser.Parser.IniDataParser.Parse (System.String iniDataString) [0x0009e] in <a4428ae829914046a49c26dc22f3ce69>:0
--- End of inner exception stack trace ---
at IniParser.Parser.IniDataParser.Parse (System.String iniDataString) [0x00196] in <a4428ae829914046a49c26dc22f3ce69>:0
at IniParser.StreamIniDataParser.ReadData (System.IO.StreamReader reader) [0x0001d] in <a4428ae829914046a49c26dc22f3ce69>:0
at IniParser.FileIniDataParser.ReadFile (System.String filePath, System.Text.Encoding fileEncoding) [0x0002d] in <a4428ae829914046a49c26dc22f3ce69>:0
at WakaTime.WakaTimeConfigFile..cctor () [0x00037] in <49e69ac0e4a3429696038fbe6d4ac07a>:0
--- End of inner exception stack trace ---
at SettingsForm.SettingsForm_Load () [0x00002] in <f9c15673820242139e70bd87b9f0ddf7>:0
salaros commented
This bug has been solved by replacing IniParser with my own library for reading / writing configuration files