Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xlint: check for var definitions other than x=... #42

Open
Gottox opened this issue May 22, 2016 · 4 comments
Open

xlint: check for var definitions other than x=... #42

Gottox opened this issue May 22, 2016 · 4 comments

Comments

@Gottox
Copy link
Contributor

Gottox commented May 22, 2016

The Posix Shell allows to set global variables with constructs other then x=. xlint should check if a variable is set with one of these constructs:

  • for i ...
  • export i=
  • ...?
@Vaelatern
Copy link
Collaborator

Does declaring i as local actually fix xgensum for your template?

@Vaelatern
Copy link
Collaborator

02:04 <Gottox> + sed http://downloads.arduino.cc/reference-1.6.6-3.zip -e '/^checksum...
02:04 <Gottox> okay, something is wrong here.
02:04 <Vaelatern> Should be sed -i
02:04 <Gottox> aaaah.
02:04 <Vaelatern> sed $i -e "/^checksum=/,/^[^ \t]/{ <-- the line
02:05 <Gottox> in the template I'm using a for i ... loop
02:06 <Vaelatern> see lines 8-10 of xgensum
02:06 <Gottox> so the template overwrites i
02:06 <Gottox> and xlint doesn't care as it's not set via i=

@Gottox
Copy link
Contributor Author

Gottox commented May 22, 2016

No, it was used to construct the distfiles at the toplevel local doesn't work here. I fixed this by prefixing it with an underscore.

This was an error in my template that caused xgensum to missbehave. These kind of error should be checked in xlint.

@Chocimier
Copy link
Contributor

Also checking for function names may be useful (i merged some of those, unfortunately):

find srcpkgs -name template | xargs -n 1 grep '\S*.+[(][)] [{]' -Ph | grep -vF --regex={do,pre,post,pkg}_{install,check,build,configure,extract,fetch,clean,patch}'() {' -e package'() {' | grep -vP '^_' 
        sed -i 's/op_test() {/& return 0;/' boot-strap
seccomp_audit_get_suffix() {
post_Install() {
Projucer() {
pkg_lang() {
post_intsall() {
disable_module() {
post_intall() {
post-install() {
post-install() {
vopt_hflag() {
mk_string_build_args() {
post-install() {
post-install() {
post-install() {
post-install() {
post-install() {
post-install() {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants