Swiftlint unable to open configuration file - swift

I installed swiftlint through brew
brew install swiftlint
verified successfull installation through
swiftlint --version
0.50.1
Added script to project
export PATH="$PATH:/opt/homebrew/bin"
if which swiftlint >/dev/null; then
echo "SwiftLint started"
swiftlint
else
echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint"
fi
Also i have:
root project:
-> .swiftlint.yml
When i'm trying to build project I'm getting
Tried also
swiftlint lint --config project/.swiftlint.yml
Update:
After several mac restarts somehow after time it is fixed

Update: After several mac restarts somehow after time it is fixed

Related

EBADENGINE warnings while running Apache-Age Viewer

So while setting up Apache Age, I ran the command npm run setup and was greeted by the following EBADENGINE warnings.
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'ag-viewer#0.0.1',
npm WARN EBADENGINE required: { node: '^14.16.0' },
npm WARN EBADENGINE current: { node: 'v18.14.1', npm: '9.3.1' }
npm WARN EBADENGINE }
These warnings followed by numerous other warnings of unsupported dependencies.
The warnings say that my Node Version is other than the required one so the obvious solution was to downgrading my node version.
Documentation from the Apache-Age Viewer's Github Repository recommends using Node version - ^14.16.0 i.e., any version greater than or equal to 14.16.0 but less than 15.
First check your current Node Version by typing node -v and I recommend downgrading it if it's not >= 14.16.0 and <15.
Follow this link for help in downgrading node version.
Check your node version again after downgrading and run npm run setup again.
Hopefully, the warnings will be gone!
While one way is to downgrade the node version manually.
Alternatively you can use nvm Node Version Manager (Windows, Mac or Linux)
Then just open a terminal (admin/sudo):
nvm install 14.16.0
nvm use 14.16.0
npm run setup
The error is actually because of the wrong version of the node installed. I also faced the same error when I did the incorrect installation. You can fix it by deleting the nvm and node from your machine and reinstalling the nvm and correct node version. and run npm run setup after the required installation.
Fixing the error:
To fix this error take a look at following steps:
Delete nvm, npm and node and install it all again.
For uninstalling node run following command:
nvm uninstall 14.16.0
The command if executed successfully will return a success message indicating the version of node deleted.
Uninstalled node v13.10.1
Type following command in terminal for the deletion of nvm
#nvm deactivate will remove the path variables
nvm deactivate
#nvm unload will uninstall the nvm
nvm unload
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm
Now the node and nvm is deleted go above and download both of them again and run those commands as well.
npm run setup
npm run start
When you run npm run start, age-viewer will start running on
localhost:3000
You will see a screen like this. Enter the details to start using the age-viewer.
For setting up Apache AGE, you do not need to run the command npm run setup.
This for setting up AGE Viewer.
For setting up AGE: https://github.com/apache/age follow the guidelines.
For setting up AGE Viewer: https://github.com/apache/age-viewer follow the guidelines.

How do I fix DWM "make clean install" command error?

I was setting up DWM window manager on debian, but when conpiling it, it came up with an error.
I installed it, then tried to run it with make clean install, but it did not have the make command. I installed it with sudo apt-get install -y make. I tried to run make clean install, but it came up with the error:
make: cc: No such file or directory
make: *** [Makefile:18: drw.o] Error 127
Help?
Doing just make install (sudo if required) the first time should fix the error.
As to why it happens — you probably have a custom Makefile or your rm binary does not understand the -f flag. The upstream Makefile has the following under the clean target:
clean:
rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz
Ensure that your Makefile also passes the -f flag to rm (which means "ignore nonexistent files").

You cannot run CocoaPods as root. (CLAide::Help) Flutter

So Hello,
I know there are many similar Questions but only a few of them a specifically for Flutter.
My Problem:
I want to run my Flutter project but then this error shows up:
CocoaPods not installed or not in valid state.
Then i install cocoapods with this commant:
udo gem install -n /usr/local/bin cocoapods
However if i want to run:
pod install
it show this error:
[!] You cannot run CocoaPods as root. (CLAide::Help)
Thanks for any answer stackoverflow is my last hope
LG
Solution
Just run this command:
export PATH=$PATH:/usr/local/bin
and then:
pod setup
and
pod install
Solution
Just run this command:
export PATH=$PATH:/usr/local/bin
and then:
pod setup
and
pod install

SwiftLint setup with Xcode

I am using a setup on Xcode that runs the following script for SwiftLint
if which $PATH/swiftlint >/dev/null; then
$PATH/swiftlint
elif which $HOME/.brew/bin/swiftlint >/dev/null; then
$HOME/.brew/bin/swiftlint
elif which ~/Softwares/homebrew/bin/swiftlint >/dev/null; then
~/Softwares/homebrew/bin/swiftlint
else
echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint"
fi
I am unable to use pods or brew.
To make SwiftLint available I added the following to my path by using
vim ~/.bash_profile
export PATH
export PATH=$PATH:/Users/me/Documents/SwiftLint
and I can now access SwiftLint everywhere through the command line.
However, Xcode still displays the message that SwiftLint is not installed.
I can't use another method to install Swiftlint or change the script. I guess there is a problem with my export path - what is it?
When running scripts, .bash_profile will not be considered. I would just prepend your script like this:
if test -d "${HOME}/Documents/SwiftLint"; then
PATH="${HOME}/Documents/SwiftLint:${PATH}"
fi
export PATH
if ! which swiftlint >/dev/null 2>&1; then
echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint" >&2
fi
You could just export the path to system-wide variables.
Steps to do
open Terminal
run command open .zshrc
add export PATH="${HOME}/Documents/SwiftLint:${PATH}"
Save and close

Travis swift library compilation error

I'm trying to fix an error I have been getting from my Travis build lately and cannot seem to fix the issue:
The following build commands failed:
CompileSwift normal i386 /Users/travis/build/HarrisonEllerm/My-Pain-Manager/Pods/SwiftCharts/SwiftCharts/Layers/ChartPointsViewsLayer.swift
CompileSwiftSources normal i386 com.apple.xcode.tools.swift.compiler
(2 failures)
Everything else compiles just fine but this library for some reason throws an error each time. Does anyone know a possible solution to this problem (maybe telling Travis just to ignore the library?). It fails each time on that particular file, but I can open it up in Xcode no problem and it builds just fine locally.
Link to build: https://travis-ci.org/HarrisonEllerm/My-Pain-Manager
I have seen Get Travis CI to ignore an external library? but unfortunately no luck.
Cheers
I think you should add pod install command to your travis.yml file.
Updated before_install part:
before_install:
- rvm install ruby-2.2.2
- gem install cocoapods
- gem install xcpretty -N
- brew update
- brew install swiftlint || true #need to clean up project at some stage using swiftlint
- pod repo update
- pod install