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

tools: format.sh skip build folder #1590

Merged
merged 3 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions gr-util/src/grdeviceaddon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,5 @@ void GRDeviceAddon::setBufferSize(uint32_t bufferSize) { m_src->setBuffersize(bu
void GRDeviceAddon::registerChannel(GRTimeChannelAddon *ch) { m_channels.append(ch); }

QList<GRTimeChannelAddon *> GRDeviceAddon::getRegisteredChannels() { return m_channels; }

#include "moc_grdeviceaddon.cpp"
2 changes: 2 additions & 0 deletions gr-util/src/grproxyblock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,5 @@ bool GRProxyBlock::built() { return (!start_blk.isEmpty()) || (end_blk != nullpt

QList<gr::basic_block_sptr> GRProxyBlock::getGrStartPoint() { return start_blk; }
gr::basic_block_sptr GRProxyBlock::getGrEndPoint() { return end_blk; }

#include "moc_grproxyblock.cpp"
2 changes: 2 additions & 0 deletions gr-util/src/grsignalpath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,5 @@ void GRSignalPath::disconnect_blk(GRTopBlock *top)
QString GRSignalPath::name() const { return m_name; }

QList<GRProxyBlock *> GRSignalPath::path() { return list; }

#include "moc_grsignalpath.cpp"
2 changes: 2 additions & 0 deletions gr-util/src/grsignalsrc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,5 @@ void GRSignalSrc::destroy_blks(GRTopBlock *top)
sig = nullptr;
start_blk.clear();
}

#include "moc_grsignalsrc.cpp"
2 changes: 2 additions & 0 deletions gr-util/src/grtimechanneladdon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,3 +445,5 @@ QPushButton *ImportChannelAddon::createForgetButton(QWidget *parent)
}

void ImportChannelAddon::onDeinit() {}

#include "moc_grtimechanneladdon.cpp"
2 changes: 2 additions & 0 deletions gr-util/src/grtimeplotaddon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -591,3 +591,5 @@ void GRTimePlotAddon::setFftWindow(int idx)
}

int GRTimePlotAddon::xMode() { return m_xmode; }

#include "moc_grtimeplotaddon.cpp"
2 changes: 2 additions & 0 deletions gr-util/src/grtimeplotaddonsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -651,3 +651,5 @@ void GRTimePlotAddonSettings::showPlotLabels(bool b)
QString GRTimePlotAddonSettings::getName() { return name; }

QWidget *GRTimePlotAddonSettings::getWidget() { return widget; }

#include "moc_grtimeplotaddonsettings.cpp"
2 changes: 2 additions & 0 deletions gr-util/src/grtopblock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,5 @@ void GRTopBlock::connect(gr::basic_block_sptr src, int srcPort, gr::basic_block_
}

gr::top_block_sptr GRTopBlock::getGrBlock() { return top; }

#include "moc_grtopblock.cpp"
2 changes: 2 additions & 0 deletions gr-util/src/measure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1312,3 +1312,5 @@ double Statistic::max() const { return m_max; }

double Statistic::numPushedData() const { return m_dataCount; }
} // namespace scopy::grutil

#include "moc_measure.cpp"
2 changes: 2 additions & 0 deletions gr-util/src/measurementcontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,3 +280,5 @@ static const std::map<int, QString> icons_spect = {
*/

} // namespace scopy::grutil

#include "moc_measurementcontroller.cpp"
2 changes: 2 additions & 0 deletions gr-util/src/timechanneladdon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,5 @@ TimeChannelAddon::TimeChannelAddon(QString ch, PlotAddon *plotAddon, QPen pen, Q
{}

TimeChannelAddon::~TimeChannelAddon() {}

#include "moc_timechanneladdon.cpp"
2 changes: 2 additions & 0 deletions gui/src/basictracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,5 @@ bool BasicTracker::eventFilter(QObject *object, QEvent *event)

return QwtWidgetOverlay::eventFilter(object, event);
}

#include "moc_basictracker.cpp"
2 changes: 2 additions & 0 deletions gui/src/cursorcontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,5 @@ void CursorController::cursorsSetVisible(bool visible)
CursorSettings *CursorController::getCursorSettings() { return cursorSettings; }

PlotCursors *CursorController::getPlotCursors() { return plotCursors; }

#include "moc_cursorcontroller.cpp"
2 changes: 2 additions & 0 deletions gui/src/plotmagnifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,3 +280,5 @@ void PlotMagnifier::zoomToBase()
plot()->replot();
m_isZoomed = false;
}

#include "moc_plotmagnifier.cpp"
2 changes: 2 additions & 0 deletions gui/src/plotnavigator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -507,3 +507,5 @@ void PlotNavigator::syncPlotNavigators(PlotNavigator *pNav1, PlotNavigator *pNav
}
}
}

#include "moc_plotnavigator.cpp"
2 changes: 2 additions & 0 deletions gui/src/plottracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,5 @@ void PlotTracker::onChannelSelected(PlotChannel *ch)
}
}
}

#include "moc_plottracker.cpp"
2 changes: 2 additions & 0 deletions gui/src/plotzoomer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,3 +237,5 @@ void PlotZoomer::zoomToBase()
plot()->replot();
m_isZoomed = false;
}

#include "moc_plotzoomer.cpp"
2 changes: 2 additions & 0 deletions iio-widgets/src/datastrategy/cmdqchannelattrdatastrategy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,5 @@ void CmdQChannelAttrDataStrategy::optionalAttrReadFinished(Command *cmd)
m_optionalDataRead = QString(currentOptValue);
Q_EMIT sendData(m_dataRead, m_optionalDataRead);
}

#include "moc_cmdqchannelattrdatastrategy.cpp"
2 changes: 2 additions & 0 deletions iio-widgets/src/datastrategy/cmdqdeviceattrdatastrategy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,5 @@ void CmdQDeviceAttrDataStrategy::optionalAttrReadFinished(Command *cmd)

Q_EMIT sendData(m_dataRead, m_optionalDataRead);
}

#include "moc_cmdqdeviceattrdatastrategy.cpp"
13 changes: 7 additions & 6 deletions tools/format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@
set -x

SCOPY_REPO=$(git rev-parse --show-toplevel)
SKIP_BUILD="-not -path */build/*"

IN_PLACE="-i"
VERBOSE="--verbose"
CLANG_FORMAT="clang-format-12"
CMAKE_FORMAT="cmake-format"

find $SCOPY_REPO -type f -name "*.cpp" | xargs $CLANG_FORMAT $VERBOSE $IN_PLACE
find $SCOPY_REPO -type f -name "*.cc" | xargs $CLANG_FORMAT $VERBOSE $IN_PLACE
find $SCOPY_REPO -type f -name "*.hpp" | xargs $CLANG_FORMAT $VERBOSE $IN_PLACE
find $SCOPY_REPO -type f -name "*.h" | xargs $CLANG_FORMAT $VERBOSE $IN_PLACE
find $SCOPY_REPO -type f -name "CMakeLists.txt" | xargs $CMAKE_FORMAT $IN_PLACE
find $SCOPY_REPO -type f -name "*.cmake" | xargs $CMAKE_FORMAT $IN_PLACE
find $SCOPY_REPO $SKIP_BUILD -type f -name "*.cpp" | xargs $CLANG_FORMAT $VERBOSE $IN_PLACE
find $SCOPY_REPO $SKIP_BUILD -type f -name "*.cc" | xargs $CLANG_FORMAT $VERBOSE $IN_PLACE
find $SCOPY_REPO $SKIP_BUILD -type f -name "*.hpp" | xargs $CLANG_FORMAT $VERBOSE $IN_PLACE
find $SCOPY_REPO $SKIP_BUILD -type f -name "*.h" | xargs $CLANG_FORMAT $VERBOSE $IN_PLACE
find $SCOPY_REPO $SKIP_BUILD -type f -name "CMakeLists.txt" | xargs $CMAKE_FORMAT $IN_PLACE
find $SCOPY_REPO $SKIP_BUILD -type f -name "*.cmake" | xargs $CMAKE_FORMAT $IN_PLACE
pushd $SCOPY_REPO/tools
./includemocs.sh
popd
Expand Down
4 changes: 2 additions & 2 deletions tools/includemocs.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash
set -x

scopymodules=("core" "pluginbase" "gui" "iioutil")
scopyplugins=("testplugin" "testplugin2" "swiot")
scopymodules=("core" "pluginbase" "gui" "iioutil" "iio-widgets" "gr-util")
scopyplugins=("testplugin" "testplugin2" "swiot" "adc" "pqm" "debugger" "datalogger" "regmap")

for mod in ${scopymodules[@]};do
echo ${mod}
Expand Down
Loading