diogocabral / sherlock Goto Github PK
View Code? Open in Web Editor NEWThe Sherlock Plagiarism Detector
License: The Unlicense
The Sherlock Plagiarism Detector
License: The Unlicense
Hi, thanks for this contribution. However, I'm having trouble getting started.
I followed your instructions on the README. I downloaded the repo, unzipped it, ran 'make' from the unziped directory. When I then type the command 'sherlock' I get
zsh: command not found: sherlock
I also tried running it like ./sherlock but it does not give any output
I'm not super familiar with how to run or make these kinds of files. Any cahnce you could send more detailed instructions or update the README?
Thank you, Charlie
In order to develop sherlock it is necessary to have a license file (MIT, GPL, etc)
gcc -Wall -ansi -pedantic -O2 -g -D_DEFAULT_SOURCE -o sherlock sherlock.c
sherlock.c: In function ‘listFiles’:
sherlock.c:95:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
95 | if (!(dir = opendir(name)))
| ^~
sherlock.c:98:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
98 | while ((entry = readdir(dir)) != NULL)
it is fixed by inlining the return
diff --git a/sherlock.c b/sherlock.c
index 501582e..08be4ca 100644
--- a/sherlock.c
+++ b/sherlock.c
@@ -92,8 +92,7 @@ void listFiles(const char *name)
DIR *dir;
struct dirent *entry;
- if (!(dir = opendir(name)))
- return;
+ if (!(dir = opendir(name))) return;
while ((entry = readdir(dir)) != NULL)
{
gcc -Wall -ansi -pedantic -O2 -g -o sherlock sherlock.c
sherlock.c: In function ‘listFiles’:
sherlock.c:100:31: error: ‘DT_DIR’ undeclared (first use in this function)
if (entry->d_type == DT_DIR)
^
sherlock.c:100:31: note: each undeclared identifier is reported only once for each function it appears in
sherlock.c:120:36: error: ‘DT_REG’ undeclared (first use in this function)
else if (entry->d_type == DT_REG)
^
makefile:9: recipe for target 'sherlock' failed
make: *** [sherlock] Error 1
Simply Running make unfortunately doesn't appear to be working on all systems.
gcc -Wall -ansi -pedantic -O2 -g -D_DEFAULT_SOURCE -o sherlock sherlock.c
sherlock.c: In function ‘listFiles’:
sherlock.c:98:30: error: ‘DT_DIR’ undeclared (first use in this function)
if (entry->d_type == DT_DIR) {
^
sherlock.c:98:30: note: each undeclared identifier is reported only once for each function it appears in
sherlock.c:116:35: error: ‘DT_REG’ undeclared (first use in this function)
else if (entry->d_type == DT_REG) {
^
make: *** [sherlock] Error 1
I'm getting this issue on RHEL 7. If I find a fix before I give up on this I'll submit a PR for said fix.
attempting to run on the m1 macs returns this error
ld: can't link with a main executable file 'sherlock' for architecture arm64
is sherlock not compatible with the m1 macs?
your website is down!
After replacing \t with spaces, make runs without an issue, however nothing is created.
./sherlock *.java > results.txt
i am trying to compare two java files...but the result is empty...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.