diff --git a/daemon/rib/rib.hpp b/daemon/rib/rib.hpp
index 36d5e41..ddfa591 100644
--- a/daemon/rib/rib.hpp
+++ b/daemon/rib/rib.hpp
@@ -37,7 +37,7 @@
 
 class FibUpdater;
 
-/** \brief references a route
+/** \brief References a route.
  */
 struct RibRouteRef
 {
@@ -48,12 +48,15 @@
 bool
 operator<(const RibRouteRef& lhs, const RibRouteRef& rhs);
 
-/** \brief represents the Routing Information Base
-
-    The Routing Information Base contains a collection of Routes, each
-    represents a piece of static or dynamic routing information
-    registered by applications, operators, or NFD itself. Routes
-    associated with the same namespace are collected into a RIB entry.
+/**
+ * \brief Represents the Routing Information Base.
+ *
+ * The Routing Information Base (RIB) contains a collection of Route objects,
+ * each representing a piece of static or dynamic routing information registered
+ * by applications, operators, or NFD itself. Routes associated with the same
+ * namespace are collected into a RIB entry.
+ *
+ * \sa RibEntry
  */
 class Rib : noncopyable
 {
@@ -87,13 +90,13 @@
   }
 
   size_t
-  size() const
+  size() const noexcept
   {
     return m_nItems;
   }
 
-  bool
-  empty() const
+  [[nodiscard]] bool
+  empty() const noexcept
   {
     return m_rib.empty();
   }
@@ -105,7 +108,7 @@
   using UpdateSuccessCallback = std::function<void()>;
   using UpdateFailureCallback = std::function<void(uint32_t code, const std::string& error)>;
 
-  /** \brief passes the provided RibUpdateBatch to FibUpdater to calculate and send FibUpdates.
+  /** \brief Passes the provided RibUpdateBatch to FibUpdater to calculate and send FibUpdates.
    *
    *  If the FIB is updated successfully, onFibUpdateSuccess() will be called, and the
    *  RIB will be updated
@@ -118,7 +121,7 @@
                    const UpdateSuccessCallback& onSuccess,
                    const UpdateFailureCallback& onFailure);
 
-  /** \brief starts the FIB update process when a face has been destroyed
+  /** \brief Starts the FIB update process when a face has been destroyed.
    */
   void
   beginRemoveFace(uint64_t faceId);
@@ -167,13 +170,13 @@
   using RouteComparePredicate = bool (*)(const Route&, const Route&);
   using RouteSet = std::set<Route, RouteComparePredicate>;
 
-  /** \brief find entries under \p prefix
+  /** \brief Find entries under \p prefix.
    *  \pre a RIB entry exists at \p prefix
    */
   std::list<shared_ptr<RibEntry>>
   findDescendants(const Name& prefix) const;
 
-  /** \brief find entries under \p prefix
+  /** \brief Find entries under \p prefix.
    *  \pre a RIB entry does not exist at \p prefix
    */
   std::list<shared_ptr<RibEntry>>
@@ -185,54 +188,52 @@
   void
   updateRib(const RibUpdateBatch& batch);
 
-  /** \brief returns routes inherited from the entry's ancestors
-   *
-   *  \return{ a list of inherited routes }
+  /** \brief Returns routes inherited from the entry's ancestors.
+   *  \return a list of inherited routes
    */
   RouteSet
   getAncestorRoutes(const RibEntry& entry) const;
 
-  /** \brief returns routes inherited from the parent of the name and the parent's ancestors
-   *
+  /** \brief Returns routes inherited from the parent of the name and the parent's ancestors.
    *  \note A parent is first found for the passed name before inherited routes are collected
-   *
-   *  \return{ a list of inherited routes }
+   *  \return a list of inherited routes
    */
   RouteSet
   getAncestorRoutes(const Name& name) const;
 
-  /** \brief applies the passed inheritedRoutes and their actions to the corresponding RibEntries'
-   *  inheritedRoutes lists
+  /** \brief Applies the passed \p inheritedRoutes and their actions to the corresponding
+   *  RibEntries' inheritedRoutes lists.
    */
   void
   modifyInheritedRoutes(const RibUpdateList& inheritedRoutes);
 
 public:
-  /** \brief signals after a RIB entry is inserted
+  /** \brief Signals after a RIB entry is inserted.
    *
    *  A RIB entry is inserted when the first route associated with a
    *  certain namespace is added.
    */
   signal::Signal<Rib, Name> afterInsertEntry;
 
-  /** \brief signals after a RIB entry is erased
+  /** \brief Signals after a RIB entry is erased.
    *
    *  A RIB entry is erased when the last route associated with a
    *  certain namespace is removed.
    */
   signal::Signal<Rib, Name> afterEraseEntry;
 
-  /** \brief signals after a Route is added
+  /** \brief Signals after a Route is added.
    */
   signal::Signal<Rib, RibRouteRef> afterAddRoute;
 
-  /** \brief signals before a route is removed
+  /** \brief Signals before a route is removed.
    */
   signal::Signal<Rib, RibRouteRef> beforeRemoveRoute;
 
 private:
   RibTable m_rib;
-  std::multimap<uint64_t, shared_ptr<RibEntry>> m_faceEntries; ///< FaceId => Entry with Route on this face
+  // FaceId => Entry with Route on this face
+  std::multimap<uint64_t, shared_ptr<RibEntry>> m_faceEntries;
   size_t m_nItems = 0;
   FibUpdater* m_fibUpdater = nullptr;
 
