Comments (11)
I will run this once I'm back at the computer I had this problem with (Tuesday probably).
from scc.
Odd. I applied your change locally, and both appear in the list of languages for me.
Rust (rs)
SAS (sas)
Sass (sass,scss)
Scala (sc,scala)
Scheme (scm,ss)
Scons (csig,sconstruct,sconscript)
sed (sed)
Shell (sh)
SKILL (il)
Smarty Template (tpl)
Softbridge Basic (sbl)
SPDX (spdx)
Specman e (e)
Spice Netlist (ckt)
SQL (sql)
SRecode Template (srt)
Standard ML (SML) (sml)
Stata (do,ado)
SVG (svg)
Maybe a path issue? When you run scc are you doing so in the WSL or through CMD? If WSL (which I suspect you are using as you mention scc
not scc.exe
) after go build
you would need to run ./scc --languages
to ensure you get the new binary, or go install
to make it global (if you have this path setup).
I just tried the process both in WSL and CMD using your build without issue, so I am unable to replicate this. If you submit a PR im happy to do the generate for you though.
Actually I am faily confident it is just a path issue. Your PR indicates a change to processor/constants.go
which would only happen IF your go generate
worked with something new.
from scc.
I am getting the right path to the updated binary, but it must somehow not get the updated processor/constants.go
... I will create a PR for this instead and then reclone the repo after.
from scc.
Merged and regenerated the constants file. Should be included now if you pull from master.
from scc.
scc.exe generates after go build
(after a fresh clone from the latest GitHub version), the languages do not show up. Running go generate
and go build
, the languages still do not show up (a new processor/constants.go
does appear).
I am using a direct path to scc.exe
(and there is no other scc file on my system). (Tried both in the command window and windows powershell through Visual Studio Code). Are there any dependencies I should be aware off or any other command besides those mentioned above I should run?
from scc.
No the above should be all that is required. I am totally unable to replicate this.
See the below. I first removed a , from the languages.json file and tried to generate which produced the error. I then reverted that change, built as normal and ran scc.exe against the processor directory in the repository. I then removed Go from the list of languages in languages.json ran go generate then go build and then ran the same command to count the processor directory. Unable to recognise Go it returns nothing.
C:\Users\bboyter\Documents\Go\src\github.com\boyter\scc>go generate
failed to generate constants: failed to validate json in file 'languages.json': invalid character '"' after object key:value pair
exit status 1
main.go:9: running "go": exit status 1
C:\Users\bboyter\Documents\Go\src\github.com\boyter\scc>go build
C:\Users\bboyter\Documents\Go\src\github.com\boyter\scc>scc.exe processor
-------------------------------------------------------------------------------
Language Files Lines Code Comments Blanks Complexity
-------------------------------------------------------------------------------
Go 16 2928 2328 130 470 608
-------------------------------------------------------------------------------
Total 16 2928 2328 130 470 608
-------------------------------------------------------------------------------
Estimated Cost to Develop $65,603
Estimated Schedule Effort 5.449080 months
Estimated People Required 1.426129
-------------------------------------------------------------------------------
C:\Users\bboyter\Documents\Go\src\github.com\boyter\scc>go generate
C:\Users\bboyter\Documents\Go\src\github.com\boyter\scc>go build
C:\Users\bboyter\Documents\Go\src\github.com\boyter\scc>scc.exe processor
-------------------------------------------------------------------------------
Language Files Lines Code Comments Blanks Complexity
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
Total 0 0 0 0 0 0
-------------------------------------------------------------------------------
Estimated Cost to Develop $0
Estimated Schedule Effort 0.000000 months
Estimated People Required NaN
-------------------------------------------------------------------------------
C:\Users\bboyter\Documents\Go\src\github.com\boyter\scc>
Would you be able to try repeating the above steps for me please.
from scc.
Running go generate
does not throw an error after removing an a from the languages.json
file, but it generates the following empty processor\constants.go
package processor
const (
)
Then go build and run yields:
PS C:\Users\righoltc\Documents\GitHub\scc> go generate
PS C:\Users\righoltc\Documents\GitHub\scc> go build
PS C:\Users\righoltc\Documents\GitHub\scc> .\scc.exe --languages
ABAP (abap)
ActionScript (as)
Ada (ada,adb,ads,pad)
Agda (agda)
Alex (x)
AsciiDoc (adoc)
ASP (asa,asp)
ASP.NET (asax,ascx,asmx,aspx,master,sitemap,webinfo)
Assembly (s,asm)
ATS (dats)
Autoconf (in)
AutoHotKey (ahk)
AWK (awk)
BASH (bash)
Basic (bas)
Batch (bat,btm,cmd)
Boo (tex)
Brainfuck (bf)
C (c,ec,pgc)
C Header (h)
C Shell (csh)
C# (cs)
C++ (cc,cpp,cxx,c++,pcc)
C++ Header (hh,hpp,hxx,inl,ipp)
Cabal (cabal)
Cassius (cassius)
Ceylon (ceylon)
Clojure (clj)
ClojureScript (cljs)
CMake (cmake,cmakelists.txt)
COBOL (cob,cbl,ccp,cobol,cpy)
CoffeeScript (coffee)
Cogent (cogent)
ColdFusion (cfm)
ColdFusion CFScript (cfc)
Coq (v)
Crystal (cr)
CSS (css)
CSV (csv)
Cython (pyx)
D (d)
Dart (dart)
Device Tree (dts,dtsi)
Dhall (dhall)
Dockerfile (dockerfile,dockerignore)
Document Type Definition (dtd)
Elixir (ex,exs)
Elm (elm)
Emacs Dev Env (ede)
Emacs Lisp (el)
Erlang (erl,hrl)
Expect (exp)
Extensible Stylesheet Language Transformations (xslt)
F# (fs,fsi,fsx,fsscript)
F* (fst)
Fish (fish)
Forth (4th,forth,fr,frt,fth,f83,fb,fpm,e4,rx,ft)
FORTRAN Legacy (f,for,ftn,f77,pfo)
FORTRAN Modern (f03,f08,f90,f95)
Freemarker Template (ftl)
GDScript (gd)
Gherkin Specification (feature)
gitignore (.gitignore)
GLSL (vert,tesc,tese,geom,frag,comp)
Go (go)
Go Template (tmpl)
Gradle (gradle)
Groovy (groovy,grt,gtpl,gvy)
Hamlet (hamlet)
Handlebars (hbs,handlebars)
Happy (y,ly)
Haskell (hs)
Haxe (hx)
HEX (hex)
HTML (html,htm)
IDL (idl)
Idris (idr,lidr)
Intel HEX (ihex)
Isabelle (thy)
Jade (jade)
JAI (jai)
Java (java)
JavaScript (js,mjs)
JavaServer Pages (jsp)
Jenkins Buildfile (jenkinsfile)
JSON (json)
JSX (jsx)
Julia (jl)
Julius (julius)
Korn Shell (ksh)
Kotlin (kt,kts)
LaTeX (tex)
LD Script (lds)
Lean (lean,hlean)
LESS (less)
LEX (l)
License (license,licence,copying,copying3,unlicense,unlicence)
Lisp (lisp,lsp)
LOLCODE (lol,lols)
Lua (lua)
Lucius (lucius)
m4 (m4)
Macromedia eXtensible Markup Language (mxml)
Madlang (mad)
Makefile (makefile,mak,mk)
Markdown (md,markdown)
Meson ()
Modula3 (m3,mg,ig,i3)
Module-Definition (def)
MQL Header (mqh)
MQL4 (mq4)
MQL5 (mq5)
MSBuild (csproj,vbproj,fsproj,props,targets)
MUMPS (mps)
Mustache (mustache)
Nim (nim)
Nix (nix)
Objective C (m)
Objective C++ (mm)
OCaml (ml,mli)
Opalang (opa)
Org (org)
Oz (oz)
Pascal (pas)
Patch (patch)
Perl (pl,pm)
PHP (php)
PKGBUILD (pkgbuild)
Plain Text (text,txt)
Polly (polly)
Processing (pde)
Prolog (p,pro)
Properties File (properties)
Protocol Buffers (proto)
PSL Assertion (psl)
Puppet (pp)
PureScript (purs)
Python (py)
QCL (qcl)
QML (qml)
R (r)
Rakefile (rake)
Razor (cshtml)
Report Definition Language (rdl)
ReStructuredText (rst)
Robot Framework (robot)
Ruby (rb)
Ruby HTML (rhtml)
Rust (rs)
Sass (sass,scss)
Scala (sc,scala)
Scheme (scm,ss)
Scons (csig,sconstruct,sconscript)
sed (sed)
Shell (sh)
SKILL (il)
Smarty Template (tpl)
Softbridge Basic (sbl)
SPDX (spdx)
Specman e (e)
Spice Netlist (ckt)
SQL (sql)
SRecode Template (srt)
Standard ML (SML) (sml)
SVG (svg)
Swift (swift)
SystemVerilog (sv,svh)
TCL (tcl)
TeX (tex,sty)
Thrift (thrift)
TOML (toml)
TypeScript (ts,tsx)
TypeScript Typings (d.ts)
Unreal Script (uc,uci,upkg)
Ur/Web (ur,urs)
Ur/Web Project (urp)
Vala (vala)
Varnish Configuration (vcl)
Verilog (vg,vh)
Verilog Args File (irunargs,xrunargs)
VHDL (vhd)
Vim Script (vim)
Visual Basic (vb)
Vue (vue)
Wolfram (nb,wl)
XAML (xaml)
XCode Config (xcconfig)
XML (xml)
XML Schema (xsd)
Xtend (xtend)
YAML (yaml,yml)
Zsh (zsh)
PS C:\Users\righoltc\Documents\GitHub\scc>
For whatever reason the updated languages do not appear to be coming from processor\constants.go
.
from scc.
Note that I have very limited Go experience, so I might be missing the obvious somewhere...
from scc.
That is very odd... if constants.go
is empty then after you build you should get nothing in the language list. This suggests to me that your go build
is not working correctly for you, but oddly you get the exe file.
Do you have your GOPATH set correctly? It looks to me as though you have not set it up, and done both a go get
but then also cloned the directory. Because the cloned directory is outside the GOPATH it is looking at the old constants file as it refers to the full GOPATH.
You can verify your gopath on windows by trying echo %GOPATH%
on the command line. If you check I am willing to bet it is set to C:\Users\righoltc\go\
in which case you should open the following directory C:\Users\righoltc\go\src\github.com\boyter\scc
and try making your change in there.
Further reading about GOPATH and Go https://boyter.org/posts/how-to-start-go-project-2018/
from scc.
Works great, thanks!
from scc.
GOPATH is one of those annoying things. I should look into replacing the current dep with vgo to resolve this.
from scc.
Related Issues (20)
- How can I include all _test.go files by regex. HOT 2
- Question: Use wildcards with excludes? HOT 1
- Unable to use multiple count-as flags HOT 5
- GNUmakefile is not recognized as Makefile HOT 1
- Recognize file type base on mime type HOT 8
- --exclude-dir doesn't exclude directories HOT 4
- Shields like style HOT 2
- Different Results on Windows and Linux HOT 5
- Cut new release? HOT 2
- Why CUDA files are not supported? HOT 2
- scc handle .gitignore are unexpected HOT 1
- error in Ubuntu 18.06: file or directory does not exist HOT 4
- sourcehut on sloc.xyz HOT 8
- Wrong language Complexity/Lines calculation when using -wide
- scc version 3.2.0 fails to compile with 32 bit golang toolchain in Windows HOT 3
- "Arvo" should be "Avro" HOT 1
- Add Templ Support
- Let badge exclude/include some folders HOT 4
- scc includes the .ignore file as part of the project counting HOT 4
- Feature Request Azure Bicep Support HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scc.