Skip to content

Commit

Permalink
refactor: some code cleanup
Browse files Browse the repository at this point in the history
FossilOrigin-Name: 5c3936f9d438c426f810793ea5fb291bc45ae462f16beb68282a9aba3b62d1d6
  • Loading branch information
thindil committed Jan 1, 2025
1 parent 9ec398f commit b848949
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/beastcleaner.nim
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
## The main module of the program.

import std/[algorithm, os, osproc, parseopt, sets, strutils, terminal]
import contracts
import contracts, nimalyzer

proc showCommandLineHelp() {.sideEffect, raises: [], tags: [WriteIOEffect],
contractual.} =
Expand Down Expand Up @@ -80,8 +80,9 @@ proc main() {.raises: [], tags: [ReadIOEffect, WriteIOEffect, ExecIOEffect,
Setting = string
Actions = enum
show, clean
var filesDiff: Setting = "/tmp/beastdiff.txt"
var action: Actions = show
var
filesDiff: Setting = "/tmp/beastdiff.txt"
action: Actions = show

# Check the program's arguments and options
while true:
Expand Down Expand Up @@ -157,7 +158,9 @@ proc main() {.raises: [], tags: [ReadIOEffect, WriteIOEffect, ExecIOEffect,
open(filename = filesDiff, mode = fmWrite)
except IOError:
quit "Can't create the output file."
{.ruleOff: "assignments"}
installedFiles = installedFiles - managedFiles
{.ruleOn: "assignments"}
var diffFiles: seq[string] = @[]
for file in installedFiles:
diffFiles.add(y = file)
Expand Down

0 comments on commit b848949

Please sign in to comment.