Skip to content

Commit

Permalink
check default config file given before proceeding further
Browse files Browse the repository at this point in the history
  • Loading branch information
aghontpi committed Apr 18, 2018
1 parent 693fd4c commit 2089d22
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 29 deletions.
33 changes: 5 additions & 28 deletions CPrettify.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@

# os.system can't be used here since it creates new cmd window

def handleProcess():

res = subprocess.check_output(['/lib/uncrustify.exe',''])

#arguments containing the code
#arguments containing the code

#initiate load settings settings

Expand Down Expand Up @@ -224,6 +220,10 @@ def execute_(view,edit,region):

else:

flag =1

sublime.status_message("Provided Default config file doesnt exist")

return

cmd = [dirSetup(),"-c",fileDir,"-l","c"]
Expand Down Expand Up @@ -466,26 +466,3 @@ def run(self, edit):
restore_config()

















#ways that can be run
# $ uncrustify -c mystyle.cfg -f somefile.c -o somefile.c.unc
# $ uncrustify -c mystyle.cfg -f somefile.c > somefile.c.unc
# $ uncrustify -c mystyle.cfg somefile.c
# $ uncrustify -c mystyle.cfg --no-backup somefile.c
# $ uncrustify -c mystyle.cfg *.c
# $ uncrustify -c mystyle.cfg --no-backup *.c

2 changes: 1 addition & 1 deletion CPrettify.sublime-settings
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
//since no backup is kept quite unstable now


//can potentially result in data loss if some critical issues occur
//can potentially result in data loss if some critical issues occur



Expand Down

0 comments on commit 2089d22

Please sign in to comment.